mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-23 02:53:32 +00:00
36 lines
1.1 KiB
Vue
36 lines
1.1 KiB
Vue
<script setup>
|
|
import { reactiveOmit } from "@vueuse/core";
|
|
import { ChevronRightIcon } from '@radix-icons/vue';
|
|
import { ContextMenuSubTrigger, useForwardProps } from "reka-ui";
|
|
import { cn } from "@shared-ui/lib/utils";
|
|
|
|
const props = defineProps({
|
|
disabled: { type: Boolean, required: false },
|
|
textValue: { type: String, required: false },
|
|
asChild: { type: Boolean, required: false },
|
|
as: { type: null, required: false },
|
|
class: { type: null, required: false },
|
|
inset: { type: Boolean, required: false },
|
|
});
|
|
|
|
const delegatedProps = reactiveOmit(props, "class");
|
|
|
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
</script>
|
|
|
|
<template>
|
|
<ContextMenuSubTrigger
|
|
v-bind="forwardedProps"
|
|
: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 />
|
|
<ChevronRightIcon class="ml-auto h-4 w-4" />
|
|
</ContextMenuSubTrigger>
|
|
</template>
|