shadcn-vue/apps/www/registry/new-york/ui/stepper/StepperItem.vue
2024-11-21 11:52:31 +08:00

28 lines
703 B
Vue

<script lang="ts" setup>
import type { StepperItemProps } from 'reka-ui'
import { cn } from '@/lib/utils'
import { StepperItem, useForwardProps } from 'reka-ui'
import { computed, type HTMLAttributes } from 'vue'
const props = defineProps<StepperItemProps & { class?: HTMLAttributes['class'] }>()
const delegatedProps = computed(() => {
const { class: _, ...delegated } = props
return delegated
})
const forwarded = useForwardProps(delegatedProps)
</script>
<template>
<StepperItem
v-slot="slotProps"
v-bind="forwarded"
:class="cn('flex items-center gap-2 group data-[disabled]:pointer-events-none', props.class)"
>
<slot v-bind="slotProps" />
</StepperItem>
</template>