Blame view

天文台pc/tianwentai-ui/node_modules/react-hook-form/dist/form.d.ts 794 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  import React from 'react';
  import { FieldValues, FormProps } from './types';
  /**
   * Form component to manage submission.
   *
   * @param props - to setup submission detail. {@link FormProps}
   *
   * @returns form component or headless render prop.
   *
   * @example
   * ```tsx
   * function App() {
   *   const { control, formState: { errors } } = useForm();
   *
   *   return (
   *     <Form action="/api" control={control}>
   *       <input {...register("name")} />
   *       <p>{errors?.root?.server && 'Server error'}</p>
   *       <button>Submit</button>
   *     </Form>
   *   );
   * }
   * ```
   */
  declare function Form<TFieldValues extends FieldValues, TTransformedValues = TFieldValues>(props: FormProps<TFieldValues, TTransformedValues>): React.JSX.Element;
  export { Form };
  //# sourceMappingURL=form.d.ts.map