Skip to content

Commit

Permalink
style: format code with Prettier
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in 119e629 according to the output
from Prettier.

Details: None
  • Loading branch information
deepsource-autofix[bot] authored and DanSnow committed Feb 29, 2024
1 parent 119e629 commit c871fd7
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/components/ui/switch/Switch.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
<script setup lang="ts">
import { type HTMLAttributes, computed } from 'vue'
import {
SwitchRoot,
type SwitchRootEmits,
type SwitchRootProps,
SwitchThumb,
useForwardPropsEmits,
} from 'radix-vue'
import { SwitchRoot, type SwitchRootEmits, type SwitchRootProps, SwitchThumb, useForwardPropsEmits } from 'radix-vue'
import { cn } from '~/lib/utils'
const props = defineProps<SwitchRootProps & { class?: HTMLAttributes['class'] }>()
Expand All @@ -25,13 +19,19 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
<template>
<SwitchRoot
v-bind="forwarded"
:class="cn(
'peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',
props.class,
)"
:class="
cn(
'peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',
props.class,
)
"
>
<SwitchThumb
:class="cn('pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0')"
:class="
cn(
'pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0',
)
"
/>
</SwitchRoot>
</template>

0 comments on commit c871fd7

Please sign in to comment.