2024-04-08 17:12:39 +02:00
|
|
|
<script lang="ts">
|
|
|
|
import { Menubar as MenubarPrimitive } from "bits-ui";
|
|
|
|
import { cn } from "$lib/utils.js";
|
|
|
|
|
2025-06-08 16:32:41 +02:00
|
|
|
let {
|
|
|
|
ref = $bindable(null),
|
|
|
|
class: className,
|
|
|
|
inset = undefined,
|
|
|
|
...restProps
|
|
|
|
}: MenubarPrimitive.ItemProps & {
|
2024-04-08 17:12:39 +02:00
|
|
|
inset?: boolean;
|
2025-06-08 16:32:41 +02:00
|
|
|
} = $props();
|
2024-04-08 17:12:39 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<MenubarPrimitive.Item
|
2025-06-08 16:32:41 +02:00
|
|
|
bind:ref
|
2024-04-08 17:12:39 +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-08 17:12:39 +02:00
|
|
|
inset && "pl-8",
|
|
|
|
className
|
|
|
|
)}
|
2025-06-08 16:32:41 +02:00
|
|
|
{...restProps}
|
|
|
|
/>
|