2019-04-16 12:06:04 +08:00
|
|
|
import createReactContext, { Context } from '@ant-design/create-react-context';
|
2019-02-25 19:04:09 +08:00
|
|
|
import { ColProps } from '../grid/col';
|
2019-04-15 12:10:04 +08:00
|
|
|
import { FormLabelAlign } from './FormItem';
|
2019-02-25 19:04:09 +08:00
|
|
|
|
|
|
|
export interface FormContextProps {
|
|
|
|
vertical: boolean;
|
2019-03-08 11:25:37 +08:00
|
|
|
colon?: boolean;
|
2019-04-15 12:10:04 +08:00
|
|
|
labelAlign?: FormLabelAlign;
|
2019-02-25 19:04:09 +08:00
|
|
|
labelCol?: ColProps;
|
|
|
|
wrapperCol?: ColProps;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const FormContext: Context<FormContextProps> = createReactContext({
|
2019-03-07 15:14:27 +08:00
|
|
|
labelAlign: 'right',
|
2019-02-25 19:04:09 +08:00
|
|
|
vertical: false,
|
|
|
|
});
|