Skip to content

Commit 97b528a

Browse files
committed
fix: added <Toaster /> to sonner example
1 parent def5d60 commit 97b528a

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed
Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
import { toast } from "solid-sonner"
22

33
import { Button } from "~/registry/ui/button"
4+
import { Toaster } from "~/registry/ui/sonner"
45

56
export default function SonnerDemo() {
67
return (
7-
<Button
8-
variant="outline"
9-
onClick={() =>
10-
toast("Event has been created", {
11-
description: "Sunday, December 03, 2023 at 9:00 AM",
12-
action: {
13-
label: "Undo",
14-
onClick: () => console.log("Undo")
15-
}
16-
})
17-
}
18-
>
19-
Show Toast
20-
</Button>
8+
<>
9+
<Button
10+
variant="outline"
11+
onClick={() =>
12+
toast("Event has been created", {
13+
description: "Sunday, December 03, 2023 at 9:00 AM",
14+
action: {
15+
label: "Undo",
16+
onClick: () => console.log("Undo")
17+
}
18+
})
19+
}
20+
>
21+
Show Toast
22+
</Button>
23+
<Toaster />
24+
</>
2125
)
2226
}

0 commit comments

Comments
 (0)