@codecademy/gamut

73.6.173.6.2-alpha.3e37cd.0
dist/Toaster/index.js
~dist/Toaster/index.jsModified
+12−7
Index: package/dist/Toaster/index.js
===================================================================
--- package/dist/Toaster/index.js
+++ package/dist/Toaster/index.js
@@ -8,9 +8,10 @@
 import { jsx as _jsx } from "react/jsx-runtime";
 export const Toaster = ({
   toasts = [],
   onClose,
-  colorMode = 'light'
+  colorMode = 'light',
+  ...rest
 }) => {
   return (
     /*#__PURE__*/
     // TEMPORARY: zIndex override to stay above Overlay's default of 3 until GM-624 lands a shared z-index scale
@@ -22,17 +23,21 @@
           "aria-live": "polite",
           bottom: 88,
           position: "fixed",
           right: 16,
+          ...rest,
           children: /*#__PURE__*/_jsx(AnimatePresence, {
-            children: toasts.map(toast => /*#__PURE__*/_jsx(FadeInSlideOut, {
+            children: toasts.map(({
+              id,
+              children,
+              ...toast
+            }) => /*#__PURE__*/_jsx(FadeInSlideOut, {
               children: /*#__PURE__*/_jsx(Toast, {
-                icon: toast.icon,
-                title: toast.title,
-                onClose: () => onClose(toast.id),
-                children: toast.children
+                ...toast,
+                onClose: () => onClose(id),
+                children: children
               })
-            }, toast.id))
+            }, id))
           })
         })
       })
     })