All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m23s
26 lines
602 B
TypeScript
26 lines
602 B
TypeScript
"use client";
|
|
|
|
import { useTheme } from "next-themes";
|
|
import { Toaster as Sonner, ToasterProps } from "sonner";
|
|
|
|
const Toaster = ({ ...props }: ToasterProps) => {
|
|
const { theme = "light" } = useTheme();
|
|
|
|
return (
|
|
<Sonner
|
|
theme={theme === "system" ? "dark" : (theme as ToasterProps["theme"])}
|
|
className="toaster group"
|
|
style={
|
|
{
|
|
"--normal-bg": "var(--popover)",
|
|
"--normal-text": "var(--popover-foreground)",
|
|
"--normal-border": "var(--border)",
|
|
} as React.CSSProperties
|
|
}
|
|
{...props}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export { Toaster };
|