21 lines
438 B
Svelte
21 lines
438 B
Svelte
<script lang="ts">
|
|
import { cn } from '$lib/utils';
|
|
import type { HTMLLabelAttributes } from 'svelte/elements';
|
|
|
|
type Props = HTMLLabelAttributes & {
|
|
children?: any;
|
|
};
|
|
|
|
let { class: className, children, ...restProps }: Props = $props();
|
|
</script>
|
|
|
|
<label
|
|
class={cn(
|
|
'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
|
|
className
|
|
)}
|
|
{...restProps}
|
|
>
|
|
{@render children?.()}
|
|
</label>
|