mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Fix Toogle Column Alignment
Enable AlignCenter(), alignEnd() or alignRight() on table toogle columns
This commit is contained in:
@@ -1,5 +1,16 @@
|
||||
.fi-ta-toggle {
|
||||
@apply w-full;
|
||||
|
||||
&:not(.fi-inline) {
|
||||
@apply px-3 py-4;
|
||||
}
|
||||
|
||||
&.fi-align-center {
|
||||
@apply text-center;
|
||||
}
|
||||
|
||||
&.fi-align-end,
|
||||
&.fi-align-right {
|
||||
@apply text-end;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace Filament\Tables\Columns;
|
||||
use Filament\Forms\Components\Concerns\HasToggleColors;
|
||||
use Filament\Forms\Components\Concerns\HasToggleIcons;
|
||||
use Filament\Support\Components\Contracts\HasEmbeddedView;
|
||||
use Filament\Support\Enums\Alignment;
|
||||
use Filament\Support\Enums\IconSize;
|
||||
use Filament\Support\Facades\FilamentAsset;
|
||||
use Filament\Support\Facades\FilamentView;
|
||||
@@ -57,6 +58,7 @@ class ToggleColumn extends Column implements Editable, HasEmbeddedView
|
||||
], escape: false)
|
||||
->class([
|
||||
'fi-ta-toggle',
|
||||
((($alignment = $this->getAlignment()) instanceof Alignment) ? "fi-align-{$alignment->value}" : (is_string($alignment) ? $alignment : '')),
|
||||
'fi-inline' => $this->isInline(),
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user