Home / File/ sonner-demo.tsx — ui Source File

sonner-demo.tsx — ui Source File

Architecture documentation for sonner-demo.tsx, a tsx file in the ui codebase. 2 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  c4f1edc0_bb73_fbd4_57f8_a047f7eab13b["sonner-demo.tsx"]
  e750d152_1191_1793_7244_99c7f9c595f4["sonner"]
  c4f1edc0_bb73_fbd4_57f8_a047f7eab13b --> e750d152_1191_1793_7244_99c7f9c595f4
  57e86e45_ac6e_7278_be08_9092724e8401["button"]
  c4f1edc0_bb73_fbd4_57f8_a047f7eab13b --> 57e86e45_ac6e_7278_be08_9092724e8401
  style c4f1edc0_bb73_fbd4_57f8_a047f7eab13b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import { toast } from "sonner"

import { Button } from "@/registry/new-york-v4/ui/button"

export default function SonnerDemo() {
  return (
    <Button
      variant="outline"
      onClick={() =>
        toast("Event has been created", {
          description: "Sunday, December 03, 2023 at 9:00 AM",
          action: {
            label: "Undo",
            onClick: () => console.log("Undo"),
          },
        })
      }
    >
      Show Toast
    </Button>
  )
}

Subdomains

Functions

Dependencies

  • button
  • sonner

Frequently Asked Questions

What does sonner-demo.tsx do?
sonner-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 sonner-demo.tsx?
sonner-demo.tsx defines 1 function(s): SonnerDemo.
What does sonner-demo.tsx depend on?
sonner-demo.tsx imports 2 module(s): button, sonner.
Where is sonner-demo.tsx in the architecture?
sonner-demo.tsx is located at apps/v4/registry/new-york-v4/examples/sonner-demo.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/new-york-v4/examples).

Analyze Your Own Codebase

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

Try Supermodel Free