@@ -5,9 +5,8 @@ import * as SwitchPrimitives from '@radix-ui/react-switch'
55import { cn } from '@/lib/core/utils/cn'
66
77/**
8- * Custom switch component with thin track design.
9- * Track: 28px width, 6px height, 20px border-radius
10- * Thumb: 14px diameter circle that overlaps the track
8+ * Switch component styled to match Sim's design system.
9+ * Uses brand color for checked state, neutral border for unchecked.
1110 */
1211const Switch = React . forwardRef <
1312 React . ElementRef < typeof SwitchPrimitives . Root > ,
@@ -16,21 +15,13 @@ const Switch = React.forwardRef<
1615 < SwitchPrimitives . Root
1716 disabled = { disabled }
1817 className = { cn (
19- 'peer inline-flex h-[17px] w-[30px] shrink-0 cursor-pointer items-center rounded-[20px] transition-colors focus-visible:outline-none' ,
20- 'data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50' ,
21- 'bg-[var(--border-1)] data-[state=checked]:bg-[var(--text-primary)]' ,
18+ 'peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full bg-[var(--border-1)] transition-colors focus-visible:outline-none data-[disabled]:cursor-not-allowed data-[state=checked]:bg-[var(--brand-tertiary-2)] data-[disabled]:opacity-50' ,
2219 className
2320 ) }
2421 { ...props }
2522 ref = { ref }
2623 >
27- < SwitchPrimitives . Thumb
28- className = { cn (
29- 'pointer-events-none block h-[14px] w-[14px] rounded-full shadow-sm ring-0 transition-transform' ,
30- 'bg-[var(--white)]' ,
31- 'data-[state=checked]:translate-x-[14px] data-[state=unchecked]:translate-x-[2px]'
32- ) }
33- />
24+ < SwitchPrimitives . Thumb className = 'pointer-events-none block h-4 w-4 rounded-full bg-[var(--white)] shadow-sm ring-0 transition-transform data-[state=checked]:translate-x-[18px] data-[state=unchecked]:translate-x-0.5' />
3425 </ SwitchPrimitives . Root >
3526) )
3627
0 commit comments