forked from alibaba-fusion/next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.jsx
36 lines (31 loc) · 1.03 KB
/
index.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import ConfigProvider from '../config-provider';
import Form from './form';
import Item from './item';
import Submit from './submit';
import Reset from './reset';
import Error from './error';
Form.Item = ConfigProvider.config(Item, {
transform: /* istanbul ignore next */ (props, deprecated) => {
if ('validateStatus' in props) {
deprecated('validateStatus', 'validateState', 'Form.Item');
const { validateStatus, ...others } = props;
props = { validateState: validateStatus, ...others };
}
return props;
},
});
Form.Submit = Submit;
Form.Reset = Reset;
Form.Error = Error;
export default ConfigProvider.config(Form, {
transform: /* istanbul ignore next */ (props, deprecated) => {
if ('direction' in props) {
deprecated('direction', 'inline', 'Form');
const { direction, ...others } = props;
if (direction === 'hoz') {
props = { inline: true, ...others };
}
}
return props;
},
});