MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / FormLabel

Function FormLabel

packages/react/src/components/form.tsx:80–92  ·  view source on GitHub ↗
({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>)

Source from the content-addressed store, hash-verified

78}
79
80function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
81 const { error, formItemId } = useFormField();
82
83 return (
84 <Label
85 data-slot="form-label"
86 data-error={!!error}
87 className={cn("data-[error=true]:text-destructive", className)}
88 htmlFor={formItemId}
89 {...props}
90 />
91 );
92}
93
94function FormControl({ ...props }: React.ComponentProps<typeof Slot.Root>) {
95 const { error, formItemId, formDescriptionId, formMessageId } = useFormField();

Callers

nothing calls this directly

Calls 2

cnFunction · 0.90
useFormFieldFunction · 0.85

Tested by

no test coverage detected