Skip to content

Commit 91bae53

Browse files
Improved close icon alignment and hover state
1 parent 32d455c commit 91bae53

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

app/ui/lib/Toast.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const Toast = ({
8484
return (
8585
<div
8686
className={cn(
87-
'relative flex w-96 items-start overflow-hidden rounded-lg p-4',
87+
'relative flex w-96 items-start overflow-hidden rounded-lg p-4 elevation-2',
8888
color[variant],
8989
textColor[variant]
9090
)}
@@ -108,14 +108,19 @@ export const Toast = ({
108108
</Link>
109109
)}
110110
</div>
111-
<button
112-
type="button"
113-
aria-label="Dismiss notification"
114-
className={cn('-m-2 flex h-auto !border-transparent p-2', textColor[variant])}
115-
onClick={onClose}
116-
>
117-
<Close12Icon />
118-
</button>
111+
<div className="mr-[2px] mt-[3px] flex items-center self-baseline">
112+
<button
113+
type="button"
114+
aria-label="Dismiss notification"
115+
className={cn(
116+
'-m-2 flex items-center rounded !border-transparent p-2 hover:bg-accent-secondary-hover',
117+
textColor[variant]
118+
)}
119+
onClick={onClose}
120+
>
121+
<Close12Icon />
122+
</button>
123+
</div>
119124

120125
{timeout !== null && <TimeoutIndicator timeout={timeout} onTimeoutEnd={onClose} />}
121126
</div>

0 commit comments

Comments
 (0)