toast-demo.tsx — ui Source File
Architecture documentation for toast-demo.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR f11bb820_3054_8281_ddc6_6a0b0ab8afe7["toast-demo.tsx"] 1d9c6c27_a443_c5fd_35f3_e80b7125bc9f["use-toast"] f11bb820_3054_8281_ddc6_6a0b0ab8afe7 --> 1d9c6c27_a443_c5fd_35f3_e80b7125bc9f d418ad18_b947_f4e5_6e4c_01100d7a63e4["button"] f11bb820_3054_8281_ddc6_6a0b0ab8afe7 --> d418ad18_b947_f4e5_6e4c_01100d7a63e4 873e9420_c0bc_78ed_8630_206ed9c8f402["toast"] f11bb820_3054_8281_ddc6_6a0b0ab8afe7 --> 873e9420_c0bc_78ed_8630_206ed9c8f402 style f11bb820_3054_8281_ddc6_6a0b0ab8afe7 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"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 ToastDemo() {
const { toast } = useToast()
return (
<Button
variant="outline"
onClick={() => {
toast({
title: "Scheduled: Catch up ",
description: "Friday, February 10, 2023 at 5:57 PM",
action: (
<ToastAction altText="Goto schedule to undo">Undo</ToastAction>
),
})
}}
>
Add to calendar
</Button>
)
}
Domain
Subdomains
Functions
Dependencies
- button
- toast
- use-toast
Source
Frequently Asked Questions
What does toast-demo.tsx do?
toast-demo.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-demo.tsx?
toast-demo.tsx defines 1 function(s): ToastDemo.
What does toast-demo.tsx depend on?
toast-demo.tsx imports 3 module(s): button, toast, use-toast.
Where is toast-demo.tsx in the architecture?
toast-demo.tsx is located at deprecated/www/registry/default/examples/toast-demo.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/default/examples).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free