({
className,
...props
}: React.ComponentProps<typeof LabelPrimitive.Root>)
| 88 | } |
| 89 | |
| 90 | function 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 | |
| 107 | function FormControl({ ...props }: React.ComponentProps<typeof Slot>) { |
| 108 | const { error, formItemId, formDescriptionId, formMessageId } = useFormField() |
nothing calls this directly
no test coverage detected