solid-sonner icon indicating copy to clipboard operation
solid-sonner copied to clipboard

Add class for undefined toast type

Open Sideways-Sky opened this issue 4 months ago • 0 comments

<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

Sideways-Sky avatar Sep 29 '24 04:09 Sideways-Sky