MCPcopy Create free account
hub / github.com/cursor/community-plugins / FormField

Function FormField

apps/cursor/src/components/ui/form.tsx:30–41  ·  view source on GitHub ↗
({
  ...props
}: ControllerProps<TFieldValues, TName>)

Source from the content-addressed store, hash-verified

28);
29
30const FormField = <
31 TFieldValues extends FieldValues = FieldValues,
32 TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
33>({
34 ...props
35}: ControllerProps<TFieldValues, TName>) => {
36 return (
37 <FormFieldContext.Provider value={{ name: props.name }}>
38 <Controller {...props} />
39 </FormFieldContext.Provider>
40 );
41};
42
43const useFormField = () => {
44 const fieldContext = React.useContext(FormFieldContext);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected