autoClose doesn't work if you don't include ReactToastify.css ?
See original GitHub issueIf I don’t include ReactToastify.css
(which I’d prefer to omit than try to override everything I don’t want/need from there), the toasts remain until clicked rather than unmounting after the autoClose
delay… would it be worth documenting or providing a minimal CSS workaround to support autoClose
without the bundled CSS?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
React-toastify toasts don't close - Stack Overflow
However, whenever I click the x on the toasts they don't close. They do, however, close when I have autoClose: delay configured, as...
Read more >Handling autoClose | React-Toastify - GitHub Pages
The autoClose prop accept a duration in milliseconds or false . #Change the default delay. Copy. import React from 'react';.
Read more >Adding spinners and notifications to your React app
Notifications and loading spinners can go a long way toward making your React app more user-friendly. Learn how to implement them in an ......
Read more >react-toastify - npm
If you use a style loader you can import the stylesheet as follow : import 'react-toastify/dist/ReactToastify.min.css' ...
Read more >How to Setup Toast Notification for React Single Page ...
Libraries. I am using React Toastify for the purpose of this post, but there are plenty of toast libraries out there which you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The styles provided in the Code Sandbox aren’t sufficient to make toasts auto-dismiss on Safari or Edge. We discovered that the following styles are necessary:
Hello @DrMeers,
Thanks for the feedback.
The
autoClose
is triggered when the progress bar animation end. AnonAnimationEnd
event is bound to the component.Regarding your needs, I see 1 easy workaround possible. In the sample below, open the style file to see the minimum style needed to trigger
autoClose
.