forked from alibaba-fusion/next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.jsx
25 lines (21 loc) · 783 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
25
import ConfigProvider from '../config-provider';
import Search from './Search';
export default ConfigProvider.config(Search, {
transfrom: /* istanbul ignore next */ (props, deprecated) => {
const { onInputFocus, overlayVisible, combox, ...others } = props;
const newprops = others;
if (onInputFocus) {
deprecated('onInputFocus', 'onFocus', 'Search');
newprops.onFocus = onInputFocus;
}
if ('overlayVisible' in props) {
deprecated('overlayVisible', 'visible', 'Search');
newprops.visible = overlayVisible;
}
if (combox) {
deprecated('combox', 'popupContent', 'Search');
newprops.popupContent = combox;
}
return newprops;
},
});