Skip to content

Commit 0a05d3a

Browse files
committed
chore(webapp): storybook button to fire the agent toast
1 parent f928fb0 commit 0a05d3a

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

  • apps/webapp/app/routes/storybook.toast

apps/webapp/app/routes/storybook.toast/route.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,33 @@ export default function Story() {
5050
>
5151
Trigger error toast
5252
</Button>
53+
<Button
54+
variant="secondary/medium"
55+
onClick={() =>
56+
toast.custom(
57+
(t) => (
58+
<ToastUI
59+
variant="agent"
60+
title="Watch update"
61+
message="Error error_c4b4a797 happened again — 1 new occurrence since the watch started."
62+
t={t as string}
63+
actionNode={
64+
<Button
65+
variant="secondary/small"
66+
className="my-2 self-start"
67+
onClick={() => toast.dismiss(t as string)}
68+
>
69+
Open chat
70+
</Button>
71+
}
72+
/>
73+
),
74+
{ duration: Infinity }
75+
)
76+
}
77+
>
78+
Trigger agent toast
79+
</Button>
5380

5481
<Toaster />
5582
</div>

0 commit comments

Comments
 (0)