2024-08-26 16:48:48 +01:00
|
|
|
<script lang="ts">
|
|
|
|
import { ContextMenu as ContextMenuPrimitive } from 'bits-ui';
|
|
|
|
import { cn } from '@/utils/cn';
|
|
|
|
|
|
|
|
type $$Props = ContextMenuPrimitive.LabelProps & {
|
|
|
|
inset?: boolean;
|
|
|
|
};
|
|
|
|
|
2025-01-31 14:24:30 +00:00
|
|
|
interface Props {
|
|
|
|
class?: $$Props['class'];
|
|
|
|
inset?: $$Props['inset'];
|
|
|
|
children?: import('svelte').Snippet;
|
|
|
|
[key: string]: any
|
|
|
|
}
|
|
|
|
|
|
|
|
let { class: className = undefined, inset = undefined, children, ...rest }: Props = $props();
|
|
|
|
|
2024-08-26 16:48:48 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<ContextMenuPrimitive.Label
|
|
|
|
class={cn('text-foreground px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}
|
2025-01-31 14:24:30 +00:00
|
|
|
{...rest}
|
2024-08-26 16:48:48 +01:00
|
|
|
>
|
2025-01-31 14:24:30 +00:00
|
|
|
{@render children?.()}
|
2024-08-26 16:48:48 +01:00
|
|
|
</ContextMenuPrimitive.Label>
|