From 5ad89ab1fc66897ce8410241a1d9fca9ca5a0e25 Mon Sep 17 00:00:00 2001 From: arsam Date: Fri, 18 Sep 2026 23:18:26 +0330 Subject: [PATCH] Import source: vault/components/ui/sonner Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality. --- vault/components/ui/sonner.tsx | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 vault/components/ui/sonner.tsx diff --git a/vault/components/ui/sonner.tsx b/vault/components/ui/sonner.tsx new file mode 100644 index 0000000..9280ee5 --- /dev/null +++ b/vault/components/ui/sonner.tsx @@ -0,0 +1,49 @@ +"use client" + +import { useTheme } from "next-themes" +import { Toaster as Sonner, type ToasterProps } from "sonner" +import { CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, Loader2Icon } from "lucide-react" + +const Toaster = ({ ...props }: ToasterProps) => { + const { theme = "system" } = useTheme() + + return ( + + ), + info: ( + + ), + warning: ( + + ), + error: ( + + ), + loading: ( + + ), + }} + style={ + { + "--normal-bg": "var(--popover)", + "--normal-text": "var(--popover-foreground)", + "--normal-border": "var(--border)", + "--border-radius": "var(--radius)", + } as React.CSSProperties + } + toastOptions={{ + classNames: { + toast: "cn-toast", + }, + }} + {...props} + /> + ) +} + +export { Toaster }