Skip to content

Commit

Permalink
fix(switch): use rem instead of px
Browse files Browse the repository at this point in the history
  • Loading branch information
atticusofsparta committed Jan 9, 2025
1 parent fde8608 commit fb6ff4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/inputs/Switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ const Switch = ({
checked={checked}
className={
className?.root ??
'relative h-[25px] w-[42px] cursor-default rounded-full bg-blackA6 shadow-[0_2px_10px] shadow-blackA4 outline-none focus:shadow-[0_0_0_2px] focus:shadow-black data-[state=checked]:bg-black'
'relative h-[1.5625rem] w-[2.625rem] cursor-default rounded-full bg-blackA6 shadow-[0_0.125rem_0.625rem] shadow-blackA4 outline-none focus:shadow-[0_0_0_0.125rem] focus:shadow-black data-[state=checked]:bg-black'
}
>
<RadixSwitch.Thumb
className={
className?.thumb ??
'block size-[21px] translate-x-0.5 rounded-full bg-white shadow-[0_2px_2px] shadow-blackA4 transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[19px]'
'block size-[1.3125rem] translate-x-0.03125rem rounded-full bg-white shadow-[0_0.125rem_0.125rem] shadow-blackA4 transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[1.1875rem]'
}
/>
</RadixSwitch.Root>
Expand Down

0 comments on commit fb6ff4c

Please sign in to comment.