Files
gpx.studio/website/src/lib/components/ui/context-menu/context-menu-label.svelte

25 lines
537 B
Svelte
Raw Normal View History

2024-04-29 17:03:23 +02:00
<script lang="ts">
2025-06-21 21:07:36 +02:00
import { cn, type WithElementRef } from "$lib/utils.js";
import type { HTMLAttributes } from "svelte/elements";
2024-04-29 17:03:23 +02:00
2025-06-21 21:07:36 +02:00
let {
ref = $bindable(null),
class: className,
inset,
children,
...restProps
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
2024-04-29 17:03:23 +02:00
inset?: boolean;
2025-06-21 21:07:36 +02:00
} = $props();
2024-04-29 17:03:23 +02:00
</script>
2025-06-21 21:07:36 +02:00
<div
bind:this={ref}
data-slot="context-menu-label"
data-inset={inset}
class={cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className)}
{...restProps}
2024-04-29 17:03:23 +02:00
>
2025-06-21 21:07:36 +02:00
{@render children?.()}
</div>