MCPcopy Index your code
hub / github.com/code-with-antonio/nodebase / FormLabel

Function FormLabel

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

Source from the content-addressed store, hash-verified

88}
89
90function FormLabel({
91 className,
92 ...props
93}: React.ComponentProps<typeof LabelPrimitive.Root>) {
94 const { error, formItemId } = useFormField()
95
96 return (
97 <Label
98 data-slot="form-label"
99 data-error={!!error}
100 className={cn("data-[error=true]:text-destructive", className)}
101 htmlFor={formItemId}
102 {...props}
103 />
104 )
105}
106
107function FormControl({ ...props }: React.ComponentProps<typeof Slot>) {
108 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