Skip to content

Commit 52fadba

Browse files
author
Lasim
committed
refactor: update Switch component styles for improved appearance and consistency
1 parent 32974a8 commit 52fadba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • services/frontend/src/components/ui/switch

services/frontend/src/components/ui/switch/Switch.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
2424
data-slot="switch"
2525
v-bind="forwarded"
2626
:class="cn(
27-
'peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border-2 shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
27+
'w-[42px] h-[25px] bg-gray-300 data-[state=checked]:bg-primary rounded-full relative cursor-default transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50',
2828
props.class,
2929
)"
3030
>
3131
<SwitchThumb
3232
data-slot="switch-thumb"
33-
:class="cn('bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0')"
33+
:class="cn('block w-[21px] h-[21px] bg-white rounded-full transition-transform duration-100 translate-x-0.5 data-[state=checked]:translate-x-[19px] shadow-sm')"
3434
>
3535
<slot name="thumb" />
3636
</SwitchThumb>

0 commit comments

Comments
 (0)