1 | import * as React from 'react';
|
2 | import { List } from 'rc-field-form';
|
3 | import { FormProps as RcFormProps } from 'rc-field-form/lib/Form';
|
4 | import { Options } from 'scroll-into-view-if-needed';
|
5 | import { ColProps } from '../grid/col';
|
6 | import { FormLabelAlign } from './interface';
|
7 | import useForm, { FormInstance } from './hooks/useForm';
|
8 | import { SizeType } from '../config-provider/SizeContext';
|
9 | export declare type RequiredMark = boolean | 'optional';
|
10 | export declare type FormLayout = 'horizontal' | 'inline' | 'vertical';
|
11 | export interface FormProps<Values = any> extends Omit<RcFormProps<Values>, 'form'> {
|
12 | prefixCls?: string;
|
13 | colon?: boolean;
|
14 | name?: string;
|
15 | layout?: FormLayout;
|
16 | labelAlign?: FormLabelAlign;
|
17 | labelCol?: ColProps;
|
18 | wrapperCol?: ColProps;
|
19 | form?: FormInstance<Values>;
|
20 | size?: SizeType;
|
21 | scrollToFirstError?: Options | boolean;
|
22 | requiredMark?: RequiredMark;
|
23 |
|
24 | hideRequiredMark?: boolean;
|
25 | }
|
26 | declare const Form: <Values = any>(props: FormProps<Values> & {
|
27 | children?: React.ReactNode;
|
28 | } & {
|
29 | ref?: React.Ref<FormInstance<Values>> | undefined;
|
30 | }) => React.ReactElement;
|
31 | export { useForm, List, FormInstance };
|
32 | export default Form;
|