import React from 'react'; import Dropdown from '../Dropdown'; import ToggleSwitch from '../ToggleSwitch'; import { Config } from '../../types'; interface ClockTabProps { config: Config; onChange: (updates: Partial) => void; } const ClockTab: React.FC = ({ config, onChange }) => { const updateClock = (updates: Partial) => { onChange({ clock: { ...config.clock, ...updates } }); }; return (
updateClock({ enabled: checked })} />
updateClock({ size: e.target.value as string })} options={[ { value: 'tiny', label: 'Tiny' }, { value: 'small', label: 'Small' }, { value: 'medium', label: 'Medium' }, { value: 'large', label: 'Large' }, ]} />
updateClock({ font: e.target.value as string })} options={[ { value: 'Helvetica', label: 'Helvetica' }, { value: `'Orbitron', sans-serif`, label: 'Orbitron' }, { value: 'monospace', label: 'Monospace' }, { value: 'cursive', label: 'Cursive' }, ]} />
updateClock({ format: e.target.value as string })} options={[ { value: 'h:mm A', label: 'AM/PM' }, { value: 'HH:mm', label: '24:00' }, ]} />
); }; export default ClockTab;