emilkowalski / sonner

An opinionated toast component for React.
https://sonner.emilkowal.ski
MIT License
8.52k stars 268 forks source link

"loader" class string is defined the ToastClassnames interface but is never applied to the loader. #488

Open joewinger opened 1 month ago

joewinger commented 1 month ago

Describe the feature / bug 📝:

This example code:

<Toaster
  toastOptions={{
      unstyled: true,
      classNames: {
          loader: 'bg-red-500'
      },
  }}
/>

Doesn't yield any results.

Here's the ToastClassnames interface from src/types.ts:

export interface ToastClassnames {
  toast?: string;
  title?: string;
  description?: string;
  loader?: string; // <-- Defined right here
  closeButton?: string;
  cancelButton?: string;
  actionButton?: string;
  success?: string;
  error?: string;
  info?: string;
  warning?: string;
  loading?: string;
  default?: string;
  content?: string;
  icon?: string;
}

After digging through the code, it looks like neither getLoadingIcon() nor the default Loader element reference this loader class option.

lock-pay commented 1 week ago

Hi, Is this fix going to be merged anytime soon ?