import { Toaster as Sonner, type ToasterProps } from 'sonner';
import {
CircleCheckIcon,
InfoIcon,
TriangleAlertIcon,
OctagonXIcon,
Loader2Icon,
} from 'lucide-react';
import { useResolvedTheme } from '../../lib/hooks/use-theme';
const Toaster = ({ ...props }: ToasterProps) => {
// The app's own scheme, not next-themes' "system": there is no next-themes
// provider mounted, so its hook always answered "system" and the toasts
// followed the operating system while the dashboard followed the cookie.
const theme = useResolvedTheme();
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 };