mirror of
https://github.com/keven1024/015.git
synced 2026-06-07 12:54:34 +00:00
25 lines
775 B
Vue
25 lines
775 B
Vue
<script setup lang="ts">
|
|
import type { MenubarRootEmits, MenubarRootProps } from 'reka-ui'
|
|
import type { HTMLAttributes } from 'vue'
|
|
import { reactiveOmit } from '@vueuse/core'
|
|
import { MenubarRoot, useForwardPropsEmits } from 'reka-ui'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
const props = defineProps<MenubarRootProps & { class?: HTMLAttributes['class'] }>()
|
|
const emits = defineEmits<MenubarRootEmits>()
|
|
|
|
const delegatedProps = reactiveOmit(props, 'class')
|
|
|
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
</script>
|
|
|
|
<template>
|
|
<MenubarRoot
|
|
data-slot="menubar"
|
|
v-bind="forwarded"
|
|
:class="cn('bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs', props.class)"
|
|
>
|
|
<slot />
|
|
</MenubarRoot>
|
|
</template>
|