mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 15:13:30 +00:00
25 lines
783 B
Vue
25 lines
783 B
Vue
<script setup lang="ts">
|
|
import type { HTMLAttributes } from 'vue'
|
|
import { reactiveOmit } from '@vueuse/core'
|
|
import { PinInputRoot, type PinInputRootEmits, type PinInputRootProps, useForwardPropsEmits } from 'reka-ui'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
const props = withDefaults(defineProps<PinInputRootProps & { class?: HTMLAttributes['class'] }>(), {
|
|
modelValue: () => [],
|
|
})
|
|
const emits = defineEmits<PinInputRootEmits>()
|
|
|
|
const delegatedProps = reactiveOmit(props, 'class')
|
|
|
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
</script>
|
|
|
|
<template>
|
|
<PinInputRoot
|
|
data-slot="pin-input"
|
|
v-bind="forwarded" :class="cn('flex items-center gap-2 has-disabled:opacity-50 disabled:cursor-not-allowed', props.class)"
|
|
>
|
|
<slot />
|
|
</PinInputRoot>
|
|
</template>
|