diff --git a/src/index.tsx b/src/index.tsx index 0e28e4c..fca6d4f 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -664,7 +664,7 @@ const Toaster = forwardRef(function Toaster(props, re data-sonner-toaster data-theme={actualTheme} data-y-position={y} - data-expanded={expanded} + data-lifted={expanded && toasts.length > 1 && !expand} data-x-position={x} style={ { diff --git a/src/styles.css b/src/styles.css index 9a30a23..b792811 100644 --- a/src/styles.css +++ b/src/styles.css @@ -51,7 +51,7 @@ transition: transform 400ms ease; } -:where([data-sonner-toaster][data-expanded='true']) { +:where([data-sonner-toaster][data-lifted='true']) { transform: translateY(-10px); }