| 1 | "use client"; |
| 2 | |
| 3 | import { |
| 4 | CircleCheckIcon, |
| 5 | InfoIcon, |
| 6 | TriangleAlertIcon, |
| 7 | OctagonXIcon, |
| 8 | Loader2Icon, |
| 9 | } from "lucide-react"; |
| 10 | import { useTheme } |
| 11 | import { Toaster as |
| 12 | |
| 13 | const Toaster = ( |
| 14 | const { theme |
| 15 | |
| 16 | return ( |
| 17 | <Sonner |
| 18 | theme={theme as |
| 19 | className="toaster group" |
| 20 | icons={{ |
| 21 | success: <CircleCheckIcon className |
| 22 | info: <InfoIcon className |
| 23 | warning: <TriangleAlertIcon className |
| 24 | error: <OctagonXIcon className |
| 25 | loading: <Loader2Icon className |
| 26 | }} |
| 27 | style={ |
| 28 | { |
| 29 | "--normal-bg": "var(--popover)", |
| 30 | "--normal-text": "var(--popover-foreground)", |
| 31 | "--normal-border": "var(--border)", |
| 32 | "--border-radius": "var(--radius)", |
| 33 | } as React. |
| 34 | } |
| 35 | toastOptions={{ |
| 36 | classNames: { |
| 37 | toast: "cn-toast", |
| 38 | }, |
| 39 | }} |
| 40 | {...props} |
| 41 | /> |
| 42 | ); |
| 43 | }; |
| 44 | |
| 45 | export { Toaster }; |