mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 05:42:19 +00:00
One-shot prettier pass so the new format:check gate starts from a clean baseline. Formatting only — no behaviour change. Generator-owned and vendored artifacts stay untouched via .prettierignore.
44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
"use client";
|
|
|
|
import {
|
|
CircleCheckIcon,
|
|
InfoIcon,
|
|
Loader2Icon,
|
|
OctagonXIcon,
|
|
TriangleAlertIcon,
|
|
} from "lucide-react";
|
|
import { Toaster as Sonner, type ToasterProps } from "sonner";
|
|
|
|
const Toaster = ({ ...props }: ToasterProps) => {
|
|
return (
|
|
<Sonner
|
|
// `theme="system"` lets Sonner match the resolved theme on the
|
|
// root element (set pre-paint by the inline theme script in
|
|
// `app/layout.tsx`) instead of pinning dark — on light-mode the
|
|
// hardcoded dark toaster contrasted badly against the page.
|
|
theme="system"
|
|
className="toaster group"
|
|
icons={{
|
|
success: <CircleCheckIcon className="size-4" />,
|
|
info: <InfoIcon className="size-4" />,
|
|
warning: <TriangleAlertIcon className="size-4" />,
|
|
error: <OctagonXIcon className="size-4" />,
|
|
loading: (
|
|
<Loader2Icon className="size-4 animate-spin motion-reduce:animate-none" />
|
|
),
|
|
}}
|
|
style={
|
|
{
|
|
"--normal-bg": "var(--popover)",
|
|
"--normal-text": "var(--popover-foreground)",
|
|
"--normal-border": "var(--border)",
|
|
"--border-radius": "var(--radius)",
|
|
} as React.CSSProperties
|
|
}
|
|
{...props}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export { Toaster };
|