2024-04-29 17:03:23 +02:00
|
|
|
<script lang="ts">
|
|
|
|
|
import { ContextMenu as ContextMenuPrimitive } from "bits-ui";
|
|
|
|
|
import { cn } from "$lib/utils.js";
|
|
|
|
|
|
2025-06-08 16:32:41 +02:00
|
|
|
let {
|
|
|
|
|
ref = $bindable(null),
|
|
|
|
|
class: className,
|
|
|
|
|
inset,
|
|
|
|
|
...restProps
|
|
|
|
|
}: ContextMenuPrimitive.ItemProps & {
|
2024-04-29 17:03:23 +02:00
|
|
|
inset?: boolean;
|
2025-06-08 16:32:41 +02:00
|
|
|
} = $props();
|
2024-04-29 17:03:23 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<ContextMenuPrimitive.Item
|
2025-06-08 16:32:41 +02:00
|
|
|
bind:ref
|
2024-04-29 17:03:23 +02:00
|
|
|
class={cn(
|
2025-06-08 16:32:41 +02:00
|
|
|
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
2024-04-29 17:03:23 +02:00
|
|
|
inset && "pl-8",
|
|
|
|
|
className
|
|
|
|
|
)}
|
2025-06-08 16:32:41 +02:00
|
|
|
{...restProps}
|
|
|
|
|
/>
|