F
Filamentβ€’2y ago
Alex Rowe

Remove rounding from dashboard widgets?

Hey, I've been trying to override the rounding on the dashboard widgets. I can see this is coming in from the card component ('space-y-2 rounded-xl bg-white p-2 shadow') but was wondering if there is a protected parameter on the widget class I could set rather than overriding all the views. Any advice would be appreciated πŸ™‚
5 Replies
Alex Rowe
Alex RoweOPβ€’2y ago
The issue is the class is set in the template
<div {{ $attributes->class([
'p-2 space-y-2 bg-white shadow',
'dark:border-gray-600 dark:bg-gray-800' => config('filament.dark_mode'),
]) }}>
<div {{ $attributes->class([
'p-2 space-y-2 bg-white shadow',
'dark:border-gray-600 dark:bg-gray-800' => config('filament.dark_mode'),
]) }}>
so the only way I can see overriding it is figuring out a way of passing something into $attriubutes or overriding the blade
awcodes
awcodesβ€’2y ago
Override the rounded values in your tailwind config. If you want to do it globally.
Alex Rowe
Alex RoweOPβ€’2y ago
That's the issue: I only want it on the dashboard widgets sorry to be difficult πŸ˜‚
awcodes
awcodesβ€’2y ago
So target them in your theme file and use !important.

Did you find this page helpful?