select-label.svelte 457 B

1234567891011121314151617181920
  1. <script lang="ts">
  2. import { cn, type WithElementRef } from "$lib/utils.js";
  3. import type { HTMLAttributes } from "svelte/elements";
  4. let {
  5. ref = $bindable(null),
  6. class: className,
  7. children,
  8. ...restProps
  9. }: WithElementRef<HTMLAttributes<HTMLDivElement>> & {} = $props();
  10. </script>
  11. <div
  12. bind:this={ref}
  13. data-slot="select-label"
  14. class={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
  15. {...restProps}
  16. >
  17. {@render children?.()}
  18. </div>