From 0c767317ab91cb16d0173e40fc49dbc744362871 Mon Sep 17 00:00:00 2001 From: Kyle Pope Date: Tue, 24 Feb 2026 03:37:13 +0800 Subject: [PATCH] Fix snooze dropdown clipping in toasts, add Dismiss label to banner - SnoozeDropdown: added direction prop (up/down), toasts use 'down' so dropdown opens below the button instead of clipping off-screen - AlertBanner dismiss button now shows X icon + 'Dismiss' text to match toast style Co-Authored-By: Claude Opus 4.6 --- frontend/src/components/dashboard/AlertBanner.tsx | 3 ++- frontend/src/components/reminders/SnoozeDropdown.tsx | 7 +++++-- frontend/src/hooks/useAlerts.tsx | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/dashboard/AlertBanner.tsx b/frontend/src/components/dashboard/AlertBanner.tsx index a511259..40365bc 100644 --- a/frontend/src/components/dashboard/AlertBanner.tsx +++ b/frontend/src/components/dashboard/AlertBanner.tsx @@ -38,9 +38,10 @@ export default function AlertBanner({ alerts, onDismiss, onSnooze }: AlertBanner ))} diff --git a/frontend/src/components/reminders/SnoozeDropdown.tsx b/frontend/src/components/reminders/SnoozeDropdown.tsx index abe470d..00036a9 100644 --- a/frontend/src/components/reminders/SnoozeDropdown.tsx +++ b/frontend/src/components/reminders/SnoozeDropdown.tsx @@ -4,6 +4,7 @@ import { Clock } from 'lucide-react'; interface SnoozeDropdownProps { onSnooze: (minutes: 5 | 10 | 15) => void; label: string; + direction?: 'up' | 'down'; } const OPTIONS: { value: 5 | 10 | 15; label: string }[] = [ @@ -12,7 +13,7 @@ const OPTIONS: { value: 5 | 10 | 15; label: string }[] = [ { value: 15, label: '15 minutes' }, ]; -export default function SnoozeDropdown({ onSnooze, label }: SnoozeDropdownProps) { +export default function SnoozeDropdown({ onSnooze, label, direction = 'up' }: SnoozeDropdownProps) { const [open, setOpen] = useState(false); const ref = useRef(null); @@ -38,7 +39,9 @@ export default function SnoozeDropdown({ onSnooze, label }: SnoozeDropdownProps) Snooze {open && ( -
+
{OPTIONS.map((opt) => (