Line data Source code
1 12 : <script setup lang="ts">
2 : import { reactiveOmit } from '@vueuse/core'
3 : import type { LabelProps } from 'reka-ui'
4 : import { Label, useForwardProps } from 'reka-ui'
5 : import type { HTMLAttributes } from 'vue'
6 :
7 : import { cn } from '@comfyorg/tailwind-utils'
8 :
9 39 : const props = defineProps<LabelProps & { class?: HTMLAttributes['class'] }>()
10 39 : const forwarded = useForwardProps(reactiveOmit(props, 'class'))
11 39 : </script>
12 :
13 : <template>
14 63 : <Label
15 : v-bind="forwarded"
16 : data-slot="label"
17 : :class="
18 : cn(
19 : 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
20 : props.class
21 : )
22 : "
23 : >
24 : <slot />
25 : </Label>
26 : </template>
|