({ ...props }: React.ComponentProps<typeof Slot.Root>)
| 92 | } |
| 93 | |
| 94 | function FormControl({ ...props }: React.ComponentProps<typeof Slot.Root>) { |
| 95 | const { error, formItemId, formDescriptionId, formMessageId } = useFormField(); |
| 96 | |
| 97 | return ( |
| 98 | <Slot.Root |
| 99 | data-slot="form-control" |
| 100 | id={formItemId} |
| 101 | aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`} |
| 102 | aria-invalid={!!error} |
| 103 | {...props} |
| 104 | /> |
| 105 | ); |
| 106 | } |
| 107 | |
| 108 | function FormDescription({ className, ...props }: React.ComponentProps<"p">) { |
| 109 | const { formDescriptionId } = useFormField(); |
nothing calls this directly
no test coverage detected