Table row colorization

Please, this isn't working, am I doing anything wrong. ->recordClasses(fn (Model $record) => $record->low_quantity < $record->quantity_available ? 'bg-red-600 text-white' : '')
3 Replies
Dennis Koch
Dennis Koch2mo ago
Are the classes showing in the HTML? You probably need a theme because you are using TW classes that aren’t included with our build
smartnathan
smartnathan2mo ago
@Dennis Koch You are absolutely right, I used "bg-primary-600" and it worked. Please, where can I find all the default Filament classes. Thank you for your prompt response. I do appreciate.
LeandroFerreira
LeandroFerreira2mo ago
As Dennis said, create a custom theme: https://filamentphp.com/docs/3.x/panels/themes/#creating-a-custom-theme After, update your content configuration in tailwind.config.js to also scan for classes inside your directory: './app/Filament/*/.php' https://filamentphp.com/docs/3.x/tables/advanced/#custom-row-classes Don't forget to run npm run build to compile the theme
Want results from more Discord servers?
Add your server
More Posts