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
feat(toaster): add support for multiple toasters with unique identifiers (#665)
- Introduced `toasterId` prop in `ToastT` and `ToastOptions` interfaces to allow targeting specific toasters.
- Updated `Toaster` component to filter toasts based on `toasterId`.
- Enhanced documentation to demonstrate usage of multiple toasters.
- Added tests to verify toast rendering in the correct toaster.
Co-authored-by: Emil Kowalski <[email protected]>
When you hover on one of the toasts, they will expand. You can make that the default behavior by setting the `expand` prop to `true`, and customize it even further with the `visibleToasts` prop.
@@ -53,26 +69,26 @@ You can customize the default ARIA label for the notification container and the
| theme | Toast's theme, either `light`, `dark`, or `system`|`light`|
64
-
| richColors | Makes error and success state more colorful |`false`|
65
-
| expand | Toasts will be expanded by default |`false`|
66
-
| visibleToasts | Amount of visible toasts |`3`|
67
-
| position | Place where the toasts will be rendered |`bottom-right`|
68
-
| closeButton | Adds a close button to all toasts |`false`|
69
-
| offset | Offset from the edges of the screen. |`32px`|
70
-
| mobileOffset |Offset from the left/right edges of the screen on screens with width smaller than 600px. |`16px`|
71
-
| dir | Directionality of toast's text |`ltr`|
72
-
| hotkey | Keyboard shortcut that will move focus to the toaster area. |`⌥/alt + T`|
73
-
| invert | Dark toasts in light mode and vice versa. |`false`|
74
-
| toastOptions | These will act as default options for all toasts. See [toast()](/toast) for all available options. |`4000`|
75
-
| gap | Gap between toasts when expanded |`14`|
76
-
| loadingIcon | Changes the default loading icon |`-`|
77
-
| pauseWhenPageIsHidden | Pauses toast timers when the page is hidden, e.g., when the tab is backgrounded, the browser is minimized, or the OS is locked. |`false`|
| theme | Toast's theme, either `light`, `dark`, or `system`|`light`|
80
+
| richColors | Makes error and success state more colorful |`false`|
81
+
| expand | Toasts will be expanded by default |`false`|
82
+
| visibleToasts | Amount of visible toasts |`3`|
83
+
| position | Place where the toasts will be rendered |`bottom-right`|
84
+
| closeButton | Adds a close button to all toasts |`false`|
85
+
| offset | Offset from the edges of the screen. |`32px`|
86
+
| mobileOffset | Offset from the left/right edges of the screen on screens with width smaller than 600px. |`16px`|
87
+
| dir | Directionality of toast's text |`ltr`|
88
+
| hotkey | Keyboard shortcut that will move focus to the toaster area. |`⌥/alt + T`|
89
+
| invert | Dark toasts in light mode and vice versa. |`false`|
90
+
| toastOptions | These will act as default options for all toasts. See [toast()](/toast) for all available options. |`4000`|
91
+
| gap | Gap between toasts when expanded |`14`|
92
+
| loadingIcon | Changes the default loading icon |`-`|
93
+
| pauseWhenPageIsHidden | Pauses toast timers when the page is hidden, e.g., when the tab is backgrounded, the browser is minimized, or the OS is locked. |`false`|
0 commit comments