diff --git a/frontend/src/components/ToggleSwitch.tsx b/frontend/src/components/ToggleSwitch.tsx index 061d2563..8293ece2 100644 --- a/frontend/src/components/ToggleSwitch.tsx +++ b/frontend/src/components/ToggleSwitch.tsx @@ -6,9 +6,8 @@ type ToggleSwitchProps = { className?: string; label?: string; disabled?: boolean; - activeColor?: string; - inactiveColor?: string; - id?: string; + size?: 'small' | 'medium' | 'large'; + labelPosition?: 'left' | 'right'; }; const ToggleSwitch: React.FC = ({ @@ -17,17 +16,44 @@ const ToggleSwitch: React.FC = ({ className = '', label, disabled = false, - activeColor = 'bg-purple-30', - inactiveColor = 'bg-transparent', - id, + size = 'medium', + labelPosition = 'left', }) => { + // Size configurations + const sizeConfig = { + small: { + box: 'h-6 w-10', + toggle: 'h-4 w-4 left-1 top-1', + translate: 'translate-x-4', + }, + medium: { + box: 'h-8 w-14', + toggle: 'h-6 w-6 left-1 top-1', + translate: 'translate-x-full', + }, + large: { + box: 'h-10 w-16', + toggle: 'h-8 w-8 left-1 top-1', + translate: 'translate-x-full', + }, + }; + + const { box, toggle, translate } = sizeConfig[size]; + return (