You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -178,6 +178,16 @@ toast('Event has been created', {
});
```
### Persisting toasts
If you want a toast to stay on screen forever, you can set the `duration` to [`Infinity`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity).
```js
toast('This toast will stay on screen forever', {
duration:Infinity,
});
```
### Dismissing toasts programmatically
To remove a toast programmatically use `toast.dismiss(id)`. The `toast()` function return the id of the toast.