File tree Expand file tree Collapse file tree 2 files changed +19
-15
lines changed
routes/(app)/docs/installation Expand file tree Collapse file tree 2 files changed +19
-15
lines changed Original file line number Diff line number Diff line change 11import { toast } from "solid-sonner"
22
33import { Button } from "~/registry/ui/button"
4+ import { Toaster } from "~/registry/ui/sonner"
45
56export 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}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ When asked make sure to use Solid:
2323Install ` tailwindcss ` and its peer dependencies, then generate your ` tailwind.config.js ` and ` postcss.config.js ` files:
2424
2525``` bash
26- npm install -D tailwindcss postcss autoprefixer
26+ npm install -D tailwindcss@3 postcss autoprefixer
2727npx tailwindcss init -p
2828```
2929
You can’t perform that action at this time.
0 commit comments