Is this the best way to add a class to a custom widget?
Hey! I've got a custom widget, that I want to style separatly from the other widgets on the dashboard. So in order to do that, I want to get an identifier or class high enough up in the DOM to access it correctly.
Currently, I'm doing it like this, which works for me - but I am wondering if this is the correct approach?
<x-filament::widget>
<div class="my-custom-class">
<x-filament::card>
{{-- Widget content --}}
</x-filament::card>
</div>
</x-filament::widget>
Any ideas on how to improve on this? Because ideally I would even be one DOM element higher than that with my class definition π
2 Replies