Skip to content

Commit 9d46061

Browse files
committed
fix(web): align notification icons with titles
1 parent 6d1d549 commit 9d46061

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

‎apps/web/src/components/ui/toast.tsx‎

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -345,35 +345,35 @@ function ToastBodyContent({
345345

346346
return (
347347
<>
348-
<div className={cn("flex min-w-0 gap-2", !stackedActionLayout && "flex-1")}>
349-
{leadingIcon ? (
350-
<div
351-
className="flex h-lh w-4 shrink-0 items-center justify-center"
352-
data-slot="toast-icon"
353-
>
354-
{leadingIcon}
355-
</div>
356-
) : Icon ? (
357-
<div
358-
className="[&>svg]:h-lh [&>svg]:w-4 [&_svg]:pointer-events-none [&_svg]:shrink-0"
359-
data-slot="toast-icon"
360-
>
361-
<Icon className="in-data-[type=error]:text-destructive in-data-[type=info]:text-info in-data-[type=success]:text-success in-data-[type=warning]:text-warning in-data-[type=loading]:opacity-80" />
362-
</div>
363-
) : null}
364-
<div
365-
className={cn(
366-
"flex min-h-0 min-w-0 flex-1 flex-col gap-0.5",
367-
stackedActionLayout && "pr-5",
368-
)}
369-
>
348+
<div
349+
className={cn(
350+
"flex min-h-0 min-w-0 flex-col gap-0.5",
351+
stackedActionLayout ? "pr-5" : "flex-1",
352+
)}
353+
>
354+
<div className="flex min-w-0 gap-2">
355+
{leadingIcon ? (
356+
<div
357+
className="flex h-lh w-4 shrink-0 items-center justify-center"
358+
data-slot="toast-icon"
359+
>
360+
{leadingIcon}
361+
</div>
362+
) : Icon ? (
363+
<div
364+
className="[&>svg]:h-lh [&>svg]:w-4 [&_svg]:pointer-events-none [&_svg]:shrink-0"
365+
data-slot="toast-icon"
366+
>
367+
<Icon className="in-data-[type=error]:text-destructive in-data-[type=info]:text-info in-data-[type=success]:text-success in-data-[type=warning]:text-warning in-data-[type=loading]:opacity-80" />
368+
</div>
369+
) : null}
370370
<Toast.Title className="min-w-0 wrap-break-word font-medium" data-slot="toast-title" />
371-
<ToastDescriptionAndExpandable
372-
toastData={toastData}
373-
toastDescription={toastDescription}
374-
toastType={toastType}
375-
/>
376371
</div>
372+
<ToastDescriptionAndExpandable
373+
toastData={toastData}
374+
toastDescription={toastDescription}
375+
toastType={toastType}
376+
/>
377377
</div>
378378
{hasTrailingControls ? (
379379
<div

0 commit comments

Comments
 (0)