Make Sonner width fit toast content
This commit is contained in:
@@ -26,6 +26,9 @@ export function Toaster(props: ToasterProps) {
|
|||||||
style: {
|
style: {
|
||||||
borderRadius: "16px",
|
borderRadius: "16px",
|
||||||
padding: "10px 12px",
|
padding: "10px 12px",
|
||||||
|
width: "fit-content",
|
||||||
|
minWidth: "0",
|
||||||
|
maxWidth: "min(calc(100vw - 2rem), 32rem)",
|
||||||
background: "hsl(var(--card))",
|
background: "hsl(var(--card))",
|
||||||
color: "hsl(var(--card-foreground))",
|
color: "hsl(var(--card-foreground))",
|
||||||
border: "1px solid hsl(var(--border))",
|
border: "1px solid hsl(var(--border))",
|
||||||
@@ -33,7 +36,7 @@ export function Toaster(props: ToasterProps) {
|
|||||||
},
|
},
|
||||||
classNames: {
|
classNames: {
|
||||||
toast:
|
toast:
|
||||||
"rounded-[16px] border border-border bg-card px-3 py-2 text-card-foreground shadow-panel",
|
"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",
|
||||||
default:
|
default:
|
||||||
"border-border bg-card text-card-foreground",
|
"border-border bg-card text-card-foreground",
|
||||||
title: "text-[13px] font-medium leading-5",
|
title: "text-[13px] font-medium leading-5",
|
||||||
|
|||||||
Reference in New Issue
Block a user