Files
shadcn-ui/apps/www/registry/default/example/sonner-demo.tsx
2023-12-22 23:36:59 +04:00

23 lines
469 B
TypeScript

import { toast } from "sonner"
import { Button } from "@/registry/default/ui/button"
export default function SonnerDemo() {
return (
<Button
variant="outline"
onClick={() =>
toast("Event has been created", {
description: "Sunday, December 03, 2023 at 9:00 AM",
action: {
label: "Undo",
onClick: () => console.log("Undo"),
},
})
}
>
Show Toast
</Button>
)
}