MCPcopy Create free account
hub / github.com/code100x/daily-code / Toaster

Function Toaster

packages/ui/src/shad/ui/toaster.tsx:6–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4import { useToast } from "./use-toast";
5
6export function Toaster() {
7 const { toasts } = useToast();
8
9 return (
10 <ToastProvider>
11 {toasts.map(function ({ id, title, description, action, ...props }) {
12 return (
13 <Toast key={id} {...props}>
14 <div className="grid gap-1">
15 {title && <ToastTitle>{title}</ToastTitle>}
16 {description && <ToastDescription>{description}</ToastDescription>}
17 </div>
18 {action}
19 <ToastClose />
20 </Toast>
21 );
22 })}
23 <ToastViewport />
24 </ToastProvider>
25 );
26}

Callers

nothing calls this directly

Calls 1

useToastFunction · 0.90

Tested by

no test coverage detected