mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 13:08:41 +08:00
ae101a2056
* labelAlign should work in Form.Item * add Form & Form.Item * rename type
17 lines
433 B
TypeScript
17 lines
433 B
TypeScript
import createReactContext, { Context } from 'create-react-context';
|
|
import { ColProps } from '../grid/col';
|
|
import { FormLabelAlign } from './FormItem';
|
|
|
|
export interface FormContextProps {
|
|
vertical: boolean;
|
|
colon?: boolean;
|
|
labelAlign?: FormLabelAlign;
|
|
labelCol?: ColProps;
|
|
wrapperCol?: ColProps;
|
|
}
|
|
|
|
export const FormContext: Context<FormContextProps> = createReactContext({
|
|
labelAlign: 'right',
|
|
vertical: false,
|
|
});
|