react-notify-toast
react-notify-toast copied to clipboard
Ability to close persistent notifications
Hello and thanks for this great tool. I was wondering if it is expected to add a feature to allow the user to click on an "x" and close a notification? Will a PR for this be accepted?
I have been thinking about this. I'm thinking that an onClick
handler on the whole notification makes more sense.
PRs are of course welcome 👍
An x
also makes sense. but should be toggable, disabled by default and should probably be an inline SVG icon, since the module doesn't come bundled with any fonts/icons.
Right now, the annoying/hacky way to do it, is by passing JSX markup directly to the show function, and rendering your x
icon inside, with an onClick handler attached to the close function.
(Would not recommend to do it this way, but it would in theory solve the need)