sonner-demo.tsx — ui Source File
Architecture documentation for sonner-demo.tsx, a tsx file in the ui codebase. 3 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 6eb4cdf6_ecd6_05a0_9c33_0f6e405c8042["sonner-demo.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 6eb4cdf6_ecd6_05a0_9c33_0f6e405c8042 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 e750d152_1191_1793_7244_99c7f9c595f4["sonner"] 6eb4cdf6_ecd6_05a0_9c33_0f6e405c8042 --> e750d152_1191_1793_7244_99c7f9c595f4 57e86e45_ac6e_7278_be08_9092724e8401["button"] 6eb4cdf6_ecd6_05a0_9c33_0f6e405c8042 --> 57e86e45_ac6e_7278_be08_9092724e8401 1c2403dc_4584_9f39_4e98_855a7de18bd1["component-registry.ts"] 1c2403dc_4584_9f39_4e98_855a7de18bd1 --> 6eb4cdf6_ecd6_05a0_9c33_0f6e405c8042 style 6eb4cdf6_ecd6_05a0_9c33_0f6e405c8042 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import * as React from "react"
import { toast } from "sonner"
import { Button } from "@/registry/new-york-v4/ui/button"
const promiseCode = "`${data.name} toast has been added`"
const allTypes = [
{
name: "Default",
snippet: `toast('Event has been created')`,
action: () => toast("Event has been created"),
},
{
name: "Description",
snippet: `toast.message('Event has been created', {
description: 'Monday, January 3rd at 6:00pm',
})`,
action: () =>
toast("Event has been created", {
description: "Monday, January 3rd at 6:00pm",
}),
},
{
name: "Success",
snippet: `toast.success('Event has been created')`,
action: () => toast.success("Event has been created"),
},
{
name: "Info",
snippet: `toast.info('Be at the area 10 minutes before the event time')`,
action: () => toast.info("Be at the area 10 minutes before the event time"),
},
{
name: "Warning",
snippet: `toast.warning('Event start time cannot be earlier than 8am')`,
action: () => toast.warning("Event start time cannot be earlier than 8am"),
},
{
name: "Error",
snippet: `toast.error('Event has not been created')`,
action: () => toast.error("Event has not been created"),
},
{
name: "Action",
action: () =>
toast.message("Event has been created", {
action: {
label: "Undo",
onClick: () => console.log("Undo"),
},
}),
},
{
name: "Cancel",
action: () =>
toast.message("Event has been created", {
cancel: {
// ... (73 more lines)
Domain
Subdomains
Functions
Dependencies
- button
- react
- sonner
Source
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 DocumentationAtlas domain, SearchAPI 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 3 module(s): button, react, sonner.
What files import sonner-demo.tsx?
sonner-demo.tsx is imported by 1 file(s): component-registry.ts.
Where is sonner-demo.tsx in the architecture?
sonner-demo.tsx is located at apps/v4/app/(internal)/sink/components/sonner-demo.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/app/(internal)/sink/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free