solid-sonner
solid-sonner copied to clipboard
Add class for undefined toast type
<Toaster
toastOptions={{
unstyled: true,
classes: {
toast: "toast flex-row items-center",
info: "bg-info text-info-content",
success: "bg-success text-success-content",
warning: "bg-warning text-warning-content",
error: "bg-error text-error-content",
undefined: "bg-neutral text-neutral-content", //Object literal may only specify known properties, and 'undefined' does not exist in type 'ToastClasses'.
},
}}
/>
I need a way to apply styles to only a toast without a type. i.e. not info
, success
, warning
, error
...
The above code works but it's a bit of a hacky solution