1 | import * as React from 'react';
|
2 | import { FormProviderProps as RcFormProviderProps } from 'rc-field-form/lib/FormContext';
|
3 | import { ColProps } from '../grid/col';
|
4 | import { FormLabelAlign } from './interface';
|
5 | import { RequiredMark } from './Form';
|
6 | import { ValidateStatus } from './FormItem';
|
7 |
|
8 | export interface FormContextProps {
|
9 | vertical: boolean;
|
10 | name?: string;
|
11 | colon?: boolean;
|
12 | labelAlign?: FormLabelAlign;
|
13 | labelCol?: ColProps;
|
14 | wrapperCol?: ColProps;
|
15 | requiredMark?: RequiredMark;
|
16 | itemRef: (name: (string | number)[]) => (node: React.ReactElement) => void;
|
17 | }
|
18 | export declare const FormContext: React.Context<FormContextProps>;
|
19 |
|
20 | export interface FormItemContextProps {
|
21 | updateItemErrors: (name: string, errors: string[], originName?: string) => void;
|
22 | }
|
23 | export declare const FormItemContext: React.Context<FormItemContextProps>;
|
24 |
|
25 | export interface FormProviderProps extends Omit<RcFormProviderProps, 'validateMessages'> {
|
26 | prefixCls?: string;
|
27 | }
|
28 | export declare const FormProvider: React.FC<FormProviderProps>;
|
29 |
|
30 | export interface FormItemPrefixContextProps {
|
31 | prefixCls: string;
|
32 | status?: ValidateStatus;
|
33 | }
|
34 | export declare const FormItemPrefixContext: React.Context<FormItemPrefixContextProps>;
|