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

a way to disable auto-dismiss? #429

Closed
TheMikeyRoss opened this issue May 31, 2024 · 1 comment · Fixed by #430
Closed

a way to disable auto-dismiss? #429

TheMikeyRoss opened this issue May 31, 2024 · 1 comment · Fixed by #430

Comments

@TheMikeyRoss
Copy link

Is there a way to disable the auto-dismiss? I mean I can use an extremely long duration. But I'm using the sonner for cookie consent and I don't want the toast to go away unless the user clicks on "agree" (which will dismiss the toast)

@zaaakher
Copy link
Contributor

zaaakher commented May 31, 2024

As mentioned here, you'll have to use JavaScripts' Infinity (read more)

createSonner("Something", {
    duration: Infinity,
});

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

Successfully merging a pull request may close this issue.

2 participants