diff --git a/packages/ui/src/components/primitives/sonner.tsx b/packages/ui/src/components/primitives/sonner.tsx index 9f46e06d5c..a07294e5e6 100644 --- a/packages/ui/src/components/primitives/sonner.tsx +++ b/packages/ui/src/components/primitives/sonner.tsx @@ -1,33 +1,300 @@ -import { - CircleCheckIcon, - InfoIcon, - Loader2Icon, - OctagonXIcon, - TriangleAlertIcon, -} from "lucide-react" -import { useTheme } from "next-themes" -import { Toaster as Sonner, type ToasterProps } from "sonner" +import { Loader2Icon } from 'lucide-react' +import { useTheme } from 'next-themes' +import type { SVGProps } from 'react' +import { Toaster as Sonner, type ToasterProps } from 'sonner' + +const InfoIcon = ({ className }: SVGProps) => ( + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+) + +const WarningIcon = ({ className }: SVGProps) => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + +) + +const SuccessIcon = ({ className }: SVGProps) => ( + + + + + + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+) + +const ErrorIcon = ({ className }: SVGProps) => ( + + + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+) const Toaster = ({ ...props }: ToasterProps) => { - const { theme = "system" } = useTheme() + const { theme = 'system' } = useTheme() return ( , + success: , info: , - warning: , - error: , - loading: , + warning: , + error: , + loading: }} style={ { - "--normal-bg": "var(--popover)", - "--normal-text": "var(--popover-foreground)", - "--normal-border": "var(--border)", - "--border-radius": "var(--radius)", + '--normal-bg': 'var(--popover)', + '--normal-text': 'var(--popover-foreground)', + '--normal-border': 'var(--border)', + '--border-radius': 'var(--radius)' } as React.CSSProperties } {...props}