MCPcopy Create free account
hub / github.com/codeaashu/claude-code / ToastProvider

Function ToastProvider

web/components/ui/toast.tsx:150–162  ·  view source on GitHub ↗
({ children }: { children: React.ReactNode })

Source from the content-addressed store, hash-verified

148// ── Provider (mount once in layout) ──────────────────────────────────────────
149
150export function ToastProvider({ children }: { children: React.ReactNode }) {
151 const toasts = useToastStore()
152
153 return (
154 <RadixToast.Provider swipeDirection="right">
155 {children}
156 {toasts.map((t) => (
157 <ToastItem key={t.id} {...t} />
158 ))}
159 <RadixToast.Viewport className="fixed bottom-4 right-4 z-[100] flex flex-col gap-2 w-80 focus:outline-none" />
160 </RadixToast.Provider>
161 )
162}
163
164// ── Hook (alternative to imperative API) ─────────────────────────────────────
165

Callers

nothing calls this directly

Calls 1

useToastStoreFunction · 0.85

Tested by

no test coverage detected