File tree Expand file tree Collapse file tree 1 file changed +18
-14
lines changed
apps/docs/src/registry/example Expand file tree Collapse file tree 1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change 1
1
import { toast } from "solid-sonner"
2
2
3
3
import { Button } from "~/registry/ui/button"
4
+ import { Toaster } from "~/registry/ui/sonner"
4
5
5
6
export default function SonnerDemo ( ) {
6
7
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
+ </ >
21
25
)
22
26
}
You can’t perform that action at this time.
0 commit comments