MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / Toaster

Function Toaster

website/src/components/ui/toaster.tsx:4–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

useToastFunction · 0.90
mapMethod · 0.65

Tested by

no test coverage detected