mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-29 07:34:11 +00:00
* feat: init * fix * fix * fix * feat * feat * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * feat: implement icons * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * feat: update init command * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * feat: dialog * feat * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * feat: add registry:base item type * feat: rename frame to canva * fix * feat * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fi * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * feat: add all colors * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * feat: add outfit font * fix * fix * fix * fix * fix * chore: changeset * fix * fix * fix * fix * fix * fix * fix * fix
51 lines
1.0 KiB
TypeScript
51 lines
1.0 KiB
TypeScript
"use client"
|
|
|
|
import { toast } from "sonner"
|
|
|
|
import {
|
|
Example,
|
|
ExampleWrapper,
|
|
} from "@/registry/bases/base/components/example"
|
|
import { Button } from "@/registry/bases/base/ui/button"
|
|
|
|
export default function SonnerExample() {
|
|
return (
|
|
<ExampleWrapper>
|
|
<SonnerBasic />
|
|
<SonnerWithDescription />
|
|
</ExampleWrapper>
|
|
)
|
|
}
|
|
|
|
function SonnerBasic() {
|
|
return (
|
|
<Example title="Basic" className="items-center justify-center">
|
|
<Button
|
|
onClick={() => toast("Event has been created")}
|
|
variant="outline"
|
|
className="w-fit"
|
|
>
|
|
Show Toast
|
|
</Button>
|
|
</Example>
|
|
)
|
|
}
|
|
|
|
function SonnerWithDescription() {
|
|
return (
|
|
<Example title="With Description" className="items-center justify-center">
|
|
<Button
|
|
onClick={() =>
|
|
toast("Event has been created", {
|
|
description: "Monday, January 3rd at 6:00pm",
|
|
})
|
|
}
|
|
variant="outline"
|
|
className="w-fit"
|
|
>
|
|
Show Toast
|
|
</Button>
|
|
</Example>
|
|
)
|
|
}
|