Home / Function/ ToastDemo() — ui Function Reference

ToastDemo() — ui Function Reference

Architecture documentation for the ToastDemo() function in toast-demo.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  e70470f4_1519_ec3e_cf11_7c7b51bbb0ea["ToastDemo()"]
  2157c264_8629_1b31_bf5b_dada9922724e["toast-demo.tsx"]
  e70470f4_1519_ec3e_cf11_7c7b51bbb0ea -->|defined in| 2157c264_8629_1b31_bf5b_dada9922724e
  style e70470f4_1519_ec3e_cf11_7c7b51bbb0ea fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

deprecated/www/registry/new-york/examples/toast-demo.tsx lines 7–26

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>
  )
}

Subdomains

Frequently Asked Questions

What does ToastDemo() do?
ToastDemo() is a function in the ui codebase, defined in deprecated/www/registry/new-york/examples/toast-demo.tsx.
Where is ToastDemo() defined?
ToastDemo() is defined in deprecated/www/registry/new-york/examples/toast-demo.tsx at line 7.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free