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 6715b491_e01e_82e0_6854_f0278c0cfaac["sonner-types.tsx"] 4544fa74_9b37_0912_c55e_f4ff161b8e83["button"] 6715b491_e01e_82e0_6854_f0278c0cfaac --> 4544fa74_9b37_0912_c55e_f4ff161b8e83 e750d152_1191_1793_7244_99c7f9c595f4["sonner"] 6715b491_e01e_82e0_6854_f0278c0cfaac --> e750d152_1191_1793_7244_99c7f9c595f4 style 6715b491_e01e_82e0_6854_f0278c0cfaac fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import { Button } from "@/examples/base/ui/button"
import { toast } from "sonner"
export 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 DocumentationAtlas domain, ContentSourcing 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/examples/base/sonner-types.tsx (domain: DocumentationAtlas, subdomain: ContentSourcing, directory: apps/v4/examples/base).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free