-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: Implement support for multiple toaster on a page #27831
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
feat: Implement support for multiple toaster on a page #27831
Conversation
Adds the `toasterId` prop to all Toaster components and controllers. If a Toaster has the `toasterId` prop set, then it will ignore any toast events except those with its id.
packages/react-components/react-toast/stories/Toast/CustomTimeout.stories.tsx
Show resolved
Hide resolved
📊 Bundle size report🤖 This report was generated against adb50a1f3d4d2843943bc0917979050d7925792c |
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: f44600a9b36abdd6aed4aaa8e44afdf049f8870f (build) |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 5cdb457:
|
| return ( | ||
| <> | ||
| <Toaster /> | ||
| <Toaster toasterId={toasterId} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is usage of toasterId mandatory? If no, why all examples were updated?
Adds the
toasterIdprop to all Toaster components and controllers. If a Toaster has thetoasterIdprop set, then it will ignore any toast events except those with its id.This change required splitting up the dismissing functionalities into:
Addresses #27827