MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / Toaster

Function Toaster

apps/ui/src/components/ui/sonner.tsx:11–36  ·  view source on GitHub ↗
({ ...props }: ToasterProps)

Source from the content-addressed store, hash-verified

9import { Toaster as Sonner, type ToasterProps } from "sonner";
10
11const Toaster = ({ ...props }: ToasterProps) => {
12 const { theme = "system" } = useTheme();
13
14 return (
15 <Sonner
16 theme={theme as ToasterProps["theme"]}
17 className='toaster group'
18 icons={{
19 success: <CircleCheckIcon className='size-4' />,
20 info: <InfoIcon className='size-4' />,
21 warning: <TriangleAlertIcon className='size-4' />,
22 error: <OctagonXIcon className='size-4' />,
23 loading: <Loader2Icon className='size-4 animate-spin' />
24 }}
25 style={
26 {
27 "--normal-bg": "var(--popover)",
28 "--normal-text": "var(--popover-foreground)",
29 "--normal-border": "var(--border)",
30 "--border-radius": "var(--radius)"
31 } as React.CSSProperties
32 }
33 {...props}
34 />
35 );
36};
37
38export { Toaster };

Callers

nothing calls this directly

Calls 1

useThemeFunction · 0.85

Tested by

no test coverage detected