MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / Toaster

Function Toaster

frontend/src/components/ui/toaster.tsx:17–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15});
16
17export const Toaster = () => {
18 return (
19 <Portal>
20 <ChakraToaster toaster={toaster} insetInline={{ mdDown: "4" }}>
21 {(toast) => (
22 <Toast.Root width={{ md: "sm" }}>
23 {toast.type === "loading" ? (
24 <Spinner size="sm" color="blue.solid" />
25 ) : (
26 <Toast.Indicator />
27 )}
28 <Stack gap="1" flex="1" maxWidth="100%">
29 {toast.title && <Toast.Title>{toast.title}</Toast.Title>}
30 {toast.description && (
31 <Toast.Description>{toast.description}</Toast.Description>
32 )}
33 </Stack>
34 {toast.action && (
35 <Toast.ActionTrigger>{toast.action.label}</Toast.ActionTrigger>
36 )}
37 {toast.meta?.closable && <Toast.CloseTrigger />}
38 </Toast.Root>
39 )}
40 </ChakraToaster>
41 </Portal>
42 );
43};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected