18 lines
512 B
Svelte
18 lines
512 B
Svelte
<script>
|
|||
|
|
import { DropdownMenu } from 'bits-ui';
|
||
|
|
import { cn } from '$lib/utils/cn.js';
|
||
|
|
|
||
|
|
let { ref = $bindable(null), class: className, active = false, children, ...restProps } = $props();
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<DropdownMenu.Item
|
||
|
|
bind:ref
|
||
|
|
class={cn(
|
||
|
|
'flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-highlighted:bg-surface-hover',
|
||
|
|
active && 'text-primary font-medium',
|
||
|
|
className,
|
||
|
|
)}
|
||
|
|
{...restProps}
|
||
|
|
>
|
||
|
|
{@render children?.()}
|
||
|
|
</DropdownMenu.Item>
|