mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-07 14:08:09 +08:00
19 lines
576 B
Vue
19 lines
576 B
Vue
<script setup lang="ts">
|
|
import type { PrimitiveProps } from 'reka-ui'
|
|
import type { HTMLAttributes } from 'vue'
|
|
import { reactiveOmit } from '@vueuse/core'
|
|
import { Primitive, useForwardProps } from 'reka-ui'
|
|
import { cn } from '@/utils'
|
|
|
|
const props = defineProps<PrimitiveProps & { class?: HTMLAttributes['class'] }>()
|
|
const delegatedProps = reactiveOmit(props, 'class')
|
|
|
|
const forwardedProps = useForwardProps(delegatedProps)
|
|
</script>
|
|
|
|
<template>
|
|
<Primitive v-bind="forwardedProps" :class="cn('flex items-center', props.class)">
|
|
<slot />
|
|
</Primitive>
|
|
</template>
|