"use client"
import {
CircleCheckIcon,
InfoIcon,
Loader2Icon,
OctagonXIcon,
TriangleAlertIcon,
} from "lucide-react"
import { Toaster as Sonner, type ToasterProps } from "sonner"
import { useTheme } from "../ThemeProvider"
const Toaster = ({ ...props }: ToasterProps) => {
// Reuse the family theme controller rather than next-themes, so toast chrome
// tracks the base in force: "system" is already resolved (live) by the
// provider.
const { isDark } = 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
}
{...props}
/>
)
}
// Re-export the imperative API so consumers (e.g. the editor) call toasts
// through the shared package and don't each need a direct `sonner` dependency.
export { toast } from "sonner"
export { Toaster }