import { useState } from "react"; import { TimerReset } from "lucide-react"; import type { TimerState } from "../lib/types"; import { formatCountdown } from "../lib/format"; interface TimerPanelProps { timer: TimerState; onStart: (durationMs: number) => void; onStop: () => void; } export function TimerPanel({ timer, onStart, onStop }: TimerPanelProps) { const [hours, setHours] = useState("0"); const [minutes, setMinutes] = useState("30"); const [seconds, setSeconds] = useState("0"); return (
Focus timer
{formatCountdown(timer.remaining_ms)}
setHours(event.target.value)} className="rounded-2xl border border-line/40 bg-panel/70 px-4 py-3 text-text outline-none" placeholder="Hours" /> setMinutes(event.target.value)} className="rounded-2xl border border-line/40 bg-panel/70 px-4 py-3 text-text outline-none" placeholder="Minutes" /> setSeconds(event.target.value)} className="rounded-2xl border border-line/40 bg-panel/70 px-4 py-3 text-text outline-none" placeholder="Seconds" />
); }