carbon-components-react/ToastNotification: Add `onClose` prop
See original GitHub issueWhat package(s) are you using?
-
carbon-components
Detailed description
Will you please add an onClose: () => void
prop to the ToastNotification
react component?
It should replace the inner setState so that it’s possible to implement the animation behaviour defined in your design guidelines without ugly hacks that hijack the close button handler.
I’ve solved this for now by removing the close button & hooking our handler to onClick
, but our UX designer is not amused and would like to keep the close button instead.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Inline notifications - Carbon Design System
Toasts are non-modal, time-based window elements used to display short messages; they usually appear at the top of the screen and disappear after...
Read more >ToastNotification - Carbon Components Svelte
ToastNotification is a controlled component. Prevent the default close behavior using the e.preventDefault() method in the dispatched on:close event.
Read more >The 5 Best React Notification Component for Your App - Morioh
2. Toasted Notes. A super simple but flexible implementation of toast style notifications for React, initially based on the excellent implementation found in ......
Read more >Use a custom close button or remove it | React-Toastify
#Remove it. Sometimes you don't want to display a close button. It can be removed globally or per toast. Pass false to closeButton...
Read more >Menu - scrollable submenu with parent item ... - Carbon - Sage
A scrollable submenu can be added using the ScrollableBlock component. ... Menu items can be given a maximum width using the maxWidth prop....
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
Considered all I’ve said above I’m fine with the way things are now (once the
onClose
gets released that is)Thank you 👍