How to add class into x-filament::button

Hello, I'm searching for how to add class into the component button <x-filament::button type="button" @click="">{{ __('Order') }}</x-filament::button> i tested by class="bg-white" but is not apply
5 Replies
Patrick Boivin
Patrick Boivin17mo ago
The class attribute should work on the button, can you see it if you inspect your element in the browser's dev tools? There's probably another class that has higher priority than bg-white
papipsycho
papipsychoOP17mo ago
Thanks, actually the issue iss because is override by some other class, for instance i wanted to add px-8 py-3 but they are px-3 py-1 which is already use, there is anyway to override the attribute class for a button ?
Patrick Boivin
Patrick Boivin16mo ago
I think the most flexible way is to copy the Blade file into your project and customize it.
JibayMcs
JibayMcs16mo ago
🤔 maybe with @class(['bg-white']) ? It work's like a charm for me. Or use the more flexible solution from pboivin
ZedoX
ZedoX16mo ago
Not recommending this but you can also use important classes "!bg-white"
Want results from more Discord servers?
Add your server