mirror of
https://github.com/pheralb/svgl.git
synced 2025-03-13 08:30:34 +08:00
26 lines
650 B
Svelte
26 lines
650 B
Svelte
<script lang="ts">
|
|
import { ContextMenu as ContextMenuPrimitive } from 'bits-ui';
|
|
import { cn } from '@/utils/cn';
|
|
|
|
type $$Props = ContextMenuPrimitive.LabelProps & {
|
|
inset?: boolean;
|
|
};
|
|
|
|
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();
|
|
|
|
</script>
|
|
|
|
<ContextMenuPrimitive.Label
|
|
class={cn('text-foreground px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}
|
|
{...rest}
|
|
>
|
|
{@render children?.()}
|
|
</ContextMenuPrimitive.Label>
|