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

Function ToastStack

web/components/notifications/ToastStack.tsx:7–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import { useNotificationStore } from "@/lib/notifications";
6
7export function ToastStack() {
8 const toasts = useNotificationStore((s) => s.toasts);
9 const dismissToast = useNotificationStore((s) => s.dismissToast);
10
11 return (
12 <div
13 aria-live="polite"
14 aria-label="Notifications"
15 className="fixed bottom-4 right-4 z-50 flex flex-col gap-2 pointer-events-none"
16 >
17 <AnimatePresence mode="popLayout" initial={false}>
18 {toasts.map((toast) => (
19 <motion.div
20 key={toast.id}
21 layout
22 initial={{ opacity: 0, x: 80, scale: 0.92 }}
23 animate={{ opacity: 1, x: 0, scale: 1 }}
24 exit={{ opacity: 0, x: 80, scale: 0.92, transition: { duration: 0.15 } }}
25 transition={{ type: "spring", stiffness: 380, damping: 28 }}
26 >
27 <Toast toast={toast} onDismiss={dismissToast} />
28 </motion.div>
29 ))}
30 </AnimatePresence>
31 </div>
32 );
33}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected