fix(toaster): render error toasts on a red surface

Error toasts previously used the same neutral popover background as
success toasts, so a failure (e.g. a save while the backend is down)
read like a normal 'Canvas saved'. Set sonner's per-type --error-bg/
--error-text/--error-border so errors stand out in red.
This commit is contained in:
Pouzor
2026-07-19 11:33:54 +02:00
parent deccff15cf
commit e85dab8cfc
2 changed files with 41 additions and 0 deletions
+5
View File
@@ -34,6 +34,11 @@ const Toaster = ({ ...props }: ToasterProps) => {
"--normal-text": "var(--popover-foreground)",
"--normal-border": "var(--border)",
"--border-radius": "var(--radius)",
// Errors use a red surface so failures (e.g. a failed save while the
// backend is down) stand out instead of reading like a normal toast.
"--error-bg": "#f85149",
"--error-text": "#ffffff",
"--error-border": "#da3633",
} as React.CSSProperties
}
toastOptions={{