({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>)
| 78 | } |
| 79 | |
| 80 | function 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 | |
| 94 | function FormControl({ ...props }: React.ComponentProps<typeof Slot.Root>) { |
| 95 | const { error, formItemId, formDescriptionId, formMessageId } = useFormField(); |
nothing calls this directly
no test coverage detected