flbxcup/resources/js/components/ui/menubar/menubar-label.svelte
2025-06-23 23:12:40 +02:00

25 lines
541 B
Svelte

<script lang="ts">
import { cn } from "@/lib/utils.js";
import { type WithElementRef } from "bits-ui";
import type { HTMLAttributes } from "svelte/elements";
let {
ref = $bindable(null),
inset,
children,
class: className,
...restProps
}: WithElementRef<HTMLAttributes<HTMLElement>> & {
inset?: boolean;
} = $props();
</script>
<div
bind:this={ref}
data-slot="menubar-label"
data-inset={inset}
class={cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className)}
{...restProps}
>
{@render children?.()}
</div>