feat(toast): surface toasts bottom-left by the bell, brighter dark rim
Toasts rose top-right, far from the notification bell which now lives bottom-left. Anchor them bottom-left inside the content column (clears the sidebar at any width), newest nearest the bell. Add a ~50% white border in dark mode so they stand out off the conventional top-right spot.
This commit is contained in:
parent
7a5f52a89b
commit
d94f41cb56
2 changed files with 8 additions and 2 deletions
|
|
@ -31,13 +31,13 @@ export default function Toaster() {
|
|||
const toasts = useSyncExternalStore(subscribe, getActiveToasts, getActiveToasts);
|
||||
|
||||
return (
|
||||
<div className="fixed top-4 right-4 z-50 flex flex-col gap-2 w-80 max-w-[calc(100vw-2rem)]">
|
||||
<div className="absolute bottom-4 left-4 z-50 flex flex-col gap-2 w-80 max-w-[calc(100vw-2rem)]">
|
||||
{toasts.map((toast) => {
|
||||
const { icon: Icon, color, bar } = LEVEL_STYLE[toast.level];
|
||||
return (
|
||||
<div
|
||||
key={toast.id}
|
||||
className="glass relative overflow-hidden rounded-xl px-3 py-3 flex items-start gap-3 animate-[popIn_0.16s_ease]"
|
||||
className="toast-card glass relative overflow-hidden rounded-xl px-3 py-3 flex items-start gap-3 animate-[popIn_0.16s_ease]"
|
||||
>
|
||||
<Icon className={`w-5 h-5 shrink-0 mt-0.5 ${color}`} />
|
||||
<div className="min-w-0 flex-1">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue