{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "sonner", "dependencies": [ "lucide-react", "sonner" ], "registryDependencies": [ "@craft/use-appearance" ], "files": [ { "path": "registry/new-york-v4/ui/sonner.tsx", "content": "import type { CSSProperties } from \"react\";\nimport {\n CircleCheckIcon,\n InfoIcon,\n Loader2Icon,\n OctagonXIcon,\n TriangleAlertIcon,\n} from \"lucide-react\";\nimport { Toaster as Sonner, type ToasterProps } from \"sonner\";\nimport { useAppearance } from \"@/hooks/use-appearance\";\n\nfunction Toaster({ ...props }: ToasterProps) {\n const { resolvedAppearance } = useAppearance();\n\n return (\n ,\n info: ,\n warning: ,\n error: ,\n loading: ,\n }}\n style={\n {\n \"--normal-bg\": \"var(--popover)\",\n \"--normal-text\": \"var(--popover-foreground)\",\n \"--normal-border\": \"var(--border)\",\n \"--border-radius\": \"var(--radius)\",\n } as CSSProperties\n }\n toastOptions={{\n classNames: {\n toast: \"cn-toast !border-border !bg-popover !text-popover-foreground dark:!bg-sidebar\",\n success: \"!border-border !bg-popover dark:!bg-sidebar\",\n title: \"!text-popover-foreground dark:!text-foreground\",\n icon: \"!text-chart-2\",\n },\n }}\n {...props}\n />\n );\n}\n\nexport { Toaster };\n", "type": "registry:ui" } ], "type": "registry:ui" }