sonner-types.tsx — ui Source File
Architecture documentation for sonner-types.tsx, a tsx file in the ui codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 6c10a096_4402_fdee_e01a_9ef5ea65db4f["sonner-types.tsx"] e750d152_1191_1793_7244_99c7f9c595f4["sonner"] 6c10a096_4402_fdee_e01a_9ef5ea65db4f --> e750d152_1191_1793_7244_99c7f9c595f4 57e86e45_ac6e_7278_be08_9092724e8401["button"] 6c10a096_4402_fdee_e01a_9ef5ea65db4f --> 57e86e45_ac6e_7278_be08_9092724e8401 style 6c10a096_4402_fdee_e01a_9ef5ea65db4f 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 SonnerTypes() {
return (
<div className="flex flex-wrap gap-2">
<Button variant="outline" onClick={() => toast("Event has been created")}>
Default
</Button>
<Button
variant="outline"
onClick={() => toast.success("Event has been created")}
>
Success
</Button>
<Button
variant="outline"
onClick={() =>
toast.info("Be at the area 10 minutes before the event time")
}
>
Info
</Button>
<Button
variant="outline"
onClick={() =>
toast.warning("Event start time cannot be earlier than 8am")
}
>
Warning
</Button>
<Button
variant="outline"
onClick={() => toast.error("Event has not been created")}
>
Error
</Button>
<Button
variant="outline"
onClick={() => {
toast.promise<{ name: string }>(
() =>
new Promise((resolve) =>
setTimeout(() => resolve({ name: "Event" }), 2000)
),
{
loading: "Loading...",
success: (data) => `${data.name} has been created`,
error: "Error",
}
)
}}
>
Promise
</Button>
</div>
)
}
Domain
Subdomains
Functions
Dependencies
- button
- sonner
Source
Frequently Asked Questions
What does sonner-types.tsx do?
sonner-types.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-types.tsx?
sonner-types.tsx defines 1 function(s): SonnerTypes.
What does sonner-types.tsx depend on?
sonner-types.tsx imports 2 module(s): button, sonner.
Where is sonner-types.tsx in the architecture?
sonner-types.tsx is located at apps/v4/registry/new-york-v4/examples/sonner-types.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