Open williamlmao opened 1 month ago
I agree it does seem really difficult to theme these with different variants. Other than that its a siick lib.
@williamlmao the only way I've found to style the buttons was using arbitrary variants plus important modifier, like so:
<Sonner
theme='light'
richColors
toastOptions={{
classNames: {
toast: 'shadow-lg rounded-lg flex items-center p-4 text-xs gap-1.5',
error: '[&>button]:!bg-red-600',
info: '[&>button]:!bg-blue-600',
success: '[&>button]:!bg-green-600',
warning: '[&>button]:!bg-yellow-600',
},
}}
/>
Results in the following toast:
When I try to style it in the following ways, nothing works:
But in the end the toast still had a white button. Has anyone else encountered this?