diff --git a/src/molecules/Toast/Toast.stories.tsx b/src/molecules/Toast/Toast.stories.tsx index 8a862c379..3790a10d5 100644 --- a/src/molecules/Toast/Toast.stories.tsx +++ b/src/molecules/Toast/Toast.stories.tsx @@ -65,7 +65,7 @@ const meta: Meta = { undefined: undefined, withAction: { onClick: fn(), - text: 'Undo', + text: 'Read more', }, }, }, diff --git a/src/providers/ToastProvider/ToastProvider.stories.tsx b/src/providers/ToastProvider/ToastProvider.stories.tsx index a094949e0..ac5fa8398 100644 --- a/src/providers/ToastProvider/ToastProvider.stories.tsx +++ b/src/providers/ToastProvider/ToastProvider.stories.tsx @@ -11,10 +11,37 @@ function StoryComponent(args: ToastProps | string) { const { showToast, hideAllToasts } = useToasts(); return (
- - +
+ + +
+ {/* prettier-ignore */} +
+        
+          {
+            `// How to use the ToastProvider and useToasts hook
+showToast('This is a toast title');
+showToast({
+  title: 'This is a toast title',
+  description: 'This is a description',
+  variant: 'success',
+  duration: 10,
+  action: {
+    text: 'Read more',
+    onClick: () => void
+  };
+});`}
+        
+      
); }