shadcn-vue/apps/www/src/lib/registry/default/ui/menubar/MenubarSubTrigger.vue
zernonia 73c561d698
chore: bump Radix Vue v1 (#139)
* refactor: apply all v1 changes

* chore: bump radix-vue version

* chore: remove WIP

* chore: update component preview

* chore: fix old pnpm lock
2023-10-24 20:51:00 +08:00

24 lines
730 B
Vue

<script setup lang="ts">
import { MenubarSubTrigger, type MenubarSubTriggerProps } from 'radix-vue'
import { ChevronRight } from 'lucide-vue-next'
import { cn } from '@/lib/utils'
const props = defineProps<MenubarSubTriggerProps & { inset?: boolean; class?: string }>()
</script>
<template>
<MenubarSubTrigger
v-bind="props"
:class="[
cn(
'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',
inset && 'pl-8',
props.class,
),
]"
>
<slot />
<ChevronRight class="ml-auto h-4 w-4" />
</MenubarSubTrigger>
</template>