UNPKG

1.45 kBJavaScriptView Raw
1import _extends from 'babel-runtime/helpers/extends';
2import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
3import ConfigProvider from '../config-provider';
4import Form from './form';
5import Item from './item';
6import Submit from './submit';
7import Reset from './reset';
8import Error from './error';
9
10Form.Item = ConfigProvider.config(Item, {
11 transform: /* istanbul ignore next */function transform(props, deprecated) {
12 if ('validateStatus' in props) {
13 deprecated('validateStatus', 'validateState', 'Form.Item');
14
15 var _props = props,
16 validateStatus = _props.validateStatus,
17 others = _objectWithoutProperties(_props, ['validateStatus']);
18
19 props = _extends({ validateState: validateStatus }, others);
20 }
21
22 return props;
23 }
24});
25Form.Submit = Submit;
26Form.Reset = Reset;
27Form.Error = Error;
28
29export default ConfigProvider.config(Form, {
30 transform: /* istanbul ignore next */function transform(props, deprecated) {
31 if ('direction' in props) {
32 deprecated('direction', 'inline', 'Form');
33
34 var _props2 = props,
35 direction = _props2.direction,
36 others = _objectWithoutProperties(_props2, ['direction']);
37
38 if (direction === 'hoz') {
39 props = _extends({ inline: true }, others);
40 }
41 }
42
43 return props;
44 }
45});
\No newline at end of file