Refine Sonner layout and timing

This commit is contained in:
MOH
2026-03-10 18:07:47 +01:00
parent 67447bbe4b
commit 7877c8ae63
2 changed files with 33 additions and 3 deletions
+2 -3
View File
@@ -21,12 +21,11 @@ export function Toaster(props: ToasterProps) {
<Sonner
theme={resolvedTheme as ToasterProps["theme"]}
position="top-center"
duration={2400}
duration={1800}
toastOptions={{
style: {
borderRadius: "16px",
padding: "10px 12px",
width: "fit-content",
minWidth: "0",
maxWidth: "min(calc(100vw - 2rem), 32rem)",
background: "hsl(var(--card))",
@@ -36,7 +35,7 @@ export function Toaster(props: ToasterProps) {
},
classNames: {
toast:
"w-fit min-w-0 max-w-[min(calc(100vw-2rem),32rem)] rounded-[16px] border border-border bg-card px-3 py-2 text-card-foreground shadow-panel",
"min-w-0 max-w-[min(calc(100vw-2rem),32rem)] rounded-[16px] border border-border bg-card px-3 py-2 text-card-foreground shadow-panel",
default:
"border-border bg-card text-card-foreground",
title: "text-[13px] font-medium leading-5",