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 ( -