({ ...props }: React.ComponentProps<typeof Slot>)
| 105 | } |
| 106 | |
| 107 | function FormControl({ ...props }: React.ComponentProps<typeof Slot>) { |
| 108 | const { error, formItemId, formDescriptionId, formMessageId } = useFormField() |
| 109 | |
| 110 | return ( |
| 111 | <Slot |
| 112 | data-slot="form-control" |
| 113 | id={formItemId} |
| 114 | aria-describedby={ |
| 115 | !error |
| 116 | ? `${formDescriptionId}` |
| 117 | : `${formDescriptionId} ${formMessageId}` |
| 118 | } |
| 119 | aria-invalid={!!error} |
| 120 | {...props} |
| 121 | /> |
| 122 | ) |
| 123 | } |
| 124 | |
| 125 | function FormDescription({ className, ...props }: React.ComponentProps<"p">) { |
| 126 | const { formDescriptionId } = useFormField() |
nothing calls this directly
no test coverage detected