mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-21 09:15:55 +03:00
18 lines
527 B
Svelte
18 lines
527 B
Svelte
<script lang="ts">
|
|
import type { Label as LabelPrimitive } from "bits-ui";
|
|
import { getFormControl } from "formsnap";
|
|
import { cn } from "$lib/utils/style.js";
|
|
import { Label } from "$lib/components/ui/label/index.js";
|
|
|
|
type $$Props = LabelPrimitive.Props;
|
|
|
|
let className: $$Props["class"] = undefined;
|
|
export { className as class };
|
|
|
|
const { labelAttrs } = getFormControl();
|
|
</script>
|
|
|
|
<Label {...$labelAttrs} class={cn("data-[fs-error]:text-destructive", className)} {...$$restProps}>
|
|
<slot {labelAttrs} />
|
|
</Label>
|