forked from alibaba-fusion/next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.jsx
24 lines (22 loc) · 917 Bytes
/
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
import ConfigProvider from '../config-provider';
import TimePicker from './time-picker';
export default ConfigProvider.config(TimePicker, {
transform: /* istanbul ignore next */ (props, deprecated) => {
if ('defaultOpen' in props) {
deprecated('defaultOpen', 'defaultVisible', 'TimePicker');
const { defaultOpen, ...others } = props;
props = { defaultVisible: defaultOpen, ...others };
}
if ('open' in props) {
deprecated('open', 'visible', 'TimePicker');
const { open, ...others } = props;
props = { visible: open, ...others };
}
if ('onOpenChange' in props) {
deprecated('onOpenChange', 'onVisibleChange', 'TimePicker');
const { onOpenChange, ...others } = props;
props = { onVisibleChange: onOpenChange, ...others };
}
return props;
},
});