Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript Error with loading Class in toastOptions and UX Suggestion for Loading Toast #255

Closed
angelocala94 opened this issue Dec 15, 2023 · 1 comment

Comments

@angelocala94
Copy link

I've encountered a couple of issues with the Sonner component that I'd like to bring to your attention:

  1. TypeScript Error with loading Property: Using the className loading in toastOptions correctly applies the style, but TypeScript shows an error. This seems to be a mismatch in TypeScript definitions.

    loader?: string;

    <Sonner
       toastOptions={{
         // ... other options ...
         classNames: {
           // ... other class names ...
           loading:  'class-1 class-2',
         },
       }}
       // ... other props ...
     />
  2. UX Suggestion for Loading Toast: Currently, the toast of type loading behaves like other toast types in terms of auto-dismissal. For a better user experience, I suggest that the loading toast should not auto-dismiss like the others. Instead, it would be more practical for it to remain visible indefinitely until manually dismissed using its ID.

@emilkowalski
Copy link
Owner

Great suggestions, added in #298

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants