toast-destructive.tsx — ui Source File
Architecture documentation for toast-destructive.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 4f8c999b_da59_44c5_d80c_db302da5ca72["toast-destructive.tsx"] 64d95022_f8e1_3e94_bb97_22b3ebca757e["use-toast"] 4f8c999b_da59_44c5_d80c_db302da5ca72 --> 64d95022_f8e1_3e94_bb97_22b3ebca757e aa2f3ec6_f291_3763_88ec_65a3f5ad5939["button"] 4f8c999b_da59_44c5_d80c_db302da5ca72 --> aa2f3ec6_f291_3763_88ec_65a3f5ad5939 24b98a33_2ada_5229_61ae_aeb1a46ab80e["toast"] 4f8c999b_da59_44c5_d80c_db302da5ca72 --> 24b98a33_2ada_5229_61ae_aeb1a46ab80e style 4f8c999b_da59_44c5_d80c_db302da5ca72 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import { useToast } from "@/registry/new-york/hooks/use-toast"
import { Button } from "@/registry/new-york/ui/button"
import { ToastAction } from "@/registry/new-york/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>
)
}
Domain
Subdomains
Functions
Dependencies
- button
- toast
- use-toast
Source
Frequently Asked Questions
What does toast-destructive.tsx do?
toast-destructive.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in toast-destructive.tsx?
toast-destructive.tsx defines 1 function(s): ToastDestructive.
What does toast-destructive.tsx depend on?
toast-destructive.tsx imports 3 module(s): button, toast, use-toast.
Where is toast-destructive.tsx in the architecture?
toast-destructive.tsx is located at deprecated/www/registry/new-york/examples/toast-destructive.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/new-york/examples).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free