diff --git a/frontend/src/components/ToggleSwitch.tsx b/frontend/src/components/ToggleSwitch.tsx index a6fe0c64..3a4ed7db 100644 --- a/frontend/src/components/ToggleSwitch.tsx +++ b/frontend/src/components/ToggleSwitch.tsx @@ -8,6 +8,8 @@ type ToggleSwitchProps = { disabled?: boolean; size?: 'small' | 'medium' | 'large'; labelPosition?: 'left' | 'right'; + id?: string; + ariaLabel?: string; }; const ToggleSwitch: React.FC = ({ @@ -18,13 +20,15 @@ const ToggleSwitch: React.FC = ({ disabled = false, size = 'medium', labelPosition = 'left', + id, + ariaLabel, }) => { // Size configurations const sizeConfig = { small: { - box: 'h-6 w-10', - toggle: 'h-4 w-4 left-1 top-1', - translate: 'translate-x-4', + box: 'h-5 w-9', + toggle: 'h-4 w-4 left-0.5 top-0.5', + translate: 'translate-x-full', }, medium: { box: 'h-8 w-14', @@ -58,14 +62,16 @@ const ToggleSwitch: React.FC = ({
onChange(e.target.checked)} className="sr-only" disabled={disabled} + aria-label={ariaLabel} />