MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / FormControl

Function FormControl

packages/react/src/components/form.tsx:94–106  ·  view source on GitHub ↗
({ ...props }: React.ComponentProps<typeof Slot.Root>)

Source from the content-addressed store, hash-verified

92}
93
94function 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
108function FormDescription({ className, ...props }: React.ComponentProps<"p">) {
109 const { formDescriptionId } = useFormField();

Callers

nothing calls this directly

Calls 1

useFormFieldFunction · 0.85

Tested by

no test coverage detected