F
Filament17mo ago
Sesh

Certain font sizes (e.g. xs, xl) do not work in Table Builder

I would like to use the tailwind font sizes "xs" and "xl" in the table builder for a TextColumn e.g. like this:
Tables\Columns\TextColumn::make('date')
->date()
->sortable()
->size('xs'),
Tables\Columns\TextColumn::make('date')
->date()
->sortable()
->size('xs'),
"sm" and "lg" works fine. What am I doing wrong? They are used elsewhere in the app so they should be part of the css.
Solution:
Update: I was able to achieve it with this: ->extraAttributes(['class' => 'text-xl font-bold'])...
Jump to solution
2 Replies
Solution
Sesh
Sesh17mo ago
Update: I was able to achieve it with this: ->extraAttributes(['class' => 'text-xl font-bold'])
ZedoX
ZedoX17mo ago
Looking at the source code, it seems to be only handled for 'sm' & 'lg' . Not entirely sure why only those two are handled. https://github.com/filamentphp/filament/blob/163b2fc67667a5c0a72ea098db609a189158597a/packages/tables/resources/views/columns/text-column.blade.php#L34-L38 Anyways it seems like you achieved your goal using ->extraAttributes()
Want results from more Discord servers?
Add your server