mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-07-08 14:35:09 +00:00
* feat(www): add login blocks * chore(www): restructure for blocks * chore: build registry * chore: clean up chunks * fix(www): chart categories * feat(www): big registry refactor * feat(www): update blocks * feat: complex blocks * fix: update schema * feat: sync new-york and default * fix: lint * feat: move charts * fix(www): code * fix: src path * chore: rebuild registry * fix: screenshot * fix: set new-york as default
26 lines
639 B
TypeScript
26 lines
639 B
TypeScript
"use client"
|
|
|
|
import { useToast } from "@/registry/default/hooks/use-toast"
|
|
import { Button } from "@/registry/default/ui/button"
|
|
import { ToastAction } from "@/registry/default/ui/toast"
|
|
|
|
export default function ToastDestructive() {
|
|
const { toast } = useToast()
|
|
|
|
return (
|
|
<Button
|
|
variant="outline"
|
|
onClick={() => {
|
|
toast({
|
|
variant: "destructive",
|
|
title: "Uh oh! Something went wrong.",
|
|
description: "There was a problem with your request.",
|
|
action: <ToastAction altText="Try again">Try again</ToastAction>,
|
|
})
|
|
}}
|
|
>
|
|
Show Toast
|
|
</Button>
|
|
)
|
|
}
|