ant-design/components/form/context.ts

17 lines
423 B
TypeScript
Raw Normal View History

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