From b5c13dc36bdeec1876fa3e8868c0acfbfbb51017 Mon Sep 17 00:00:00 2001 From: Chelsea Lee Date: Mon, 16 Feb 2026 07:05:55 -0600 Subject: [PATCH] feat(timer): make pomodoro timer prominent in header with tomato styling - Changed timer button to red/tomato themed pill button - Added red background, border, and hover effects - Shows remaining time when running - Green pulsing indicator when active - Made TomatoIcon slightly larger (22px) for visibility --- .../src/components/timer/PomodoroTimer.tsx | 47 ++++++++++++++++--- synculous-client/src/components/ui/Icons.tsx | 24 ++++++++++ 2 files changed, 65 insertions(+), 6 deletions(-) diff --git a/synculous-client/src/components/timer/PomodoroTimer.tsx b/synculous-client/src/components/timer/PomodoroTimer.tsx index 62afd46..ab64fa2 100644 --- a/synculous-client/src/components/timer/PomodoroTimer.tsx +++ b/synculous-client/src/components/timer/PomodoroTimer.tsx @@ -1,19 +1,20 @@ 'use client'; import { useState, useEffect, useCallback, useRef } from 'react'; -import { TimerIcon, PlayIcon, PauseIcon, RefreshIcon, XIcon } from '@/components/ui/Icons'; +import { TomatoIcon, PlayIcon, PauseIcon, RefreshIcon, XIcon } from '@/components/ui/Icons'; import { playTimerEnd } from '@/lib/sounds'; interface PomodoroTimerProps { isExpanded: boolean; onToggle: () => void; + variant?: 'header' | 'floating'; } const WORK_MINUTES = 25; const SHORT_BREAK_MINUTES = 5; const LONG_BREAK_MINUTES = 15; -export default function PomodoroTimer({ isExpanded, onToggle }: PomodoroTimerProps) { +export default function PomodoroTimer({ isExpanded, onToggle, variant = 'header' }: PomodoroTimerProps) { const [mode, setMode] = useState<'work' | 'shortBreak' | 'longBreak'>('work'); const [timeLeft, setTimeLeft] = useState(WORK_MINUTES * 60); const [isRunning, setIsRunning] = useState(false); @@ -124,22 +125,56 @@ export default function PomodoroTimer({ isExpanded, onToggle }: PomodoroTimerPro // Compact view (icon only) if (!isExpanded) { + if (variant === 'floating') { + // Floating Action Button for mobile + return ( + + ); + } + + // Header variant - make it pop! return ( ); } + // Expanded view - position based on variant + const positionClasses = variant === 'floating' + ? "fixed bottom-20 right-4 sm:bottom-auto sm:top-20 sm:right-4 w-[calc(100vw-2rem)] sm:w-80" + : "absolute right-0 top-full mt-2 w-72"; + return ( -
+
{/* Header */}
diff --git a/synculous-client/src/components/ui/Icons.tsx b/synculous-client/src/components/ui/Icons.tsx index 07a0c93..209f1de 100644 --- a/synculous-client/src/components/ui/Icons.tsx +++ b/synculous-client/src/components/ui/Icons.tsx @@ -1247,3 +1247,27 @@ export function ShieldIcon({ className = '', size = 24 }: IconProps) { ); } + +export function TomatoIcon({ className = '', size = 24 }: IconProps) { + return ( + + {/* Tomato body */} + + {/* Stem */} + + + ); +}