1 | import _extends from 'babel-runtime/helpers/extends';
|
2 | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
|
3 | import ConfigProvider from '../config-provider';
|
4 | import Rating from './rating';
|
5 |
|
6 | export default ConfigProvider.config(Rating, {
|
7 | transform: function transform(props, deprecated) {
|
8 | if ('type' in props) {
|
9 | deprecated('type', 'showGrade', 'Rating');
|
10 |
|
11 | var _props = props,
|
12 | type = _props.type,
|
13 | others = _objectWithoutProperties(_props, ['type']);
|
14 |
|
15 | props = _extends({ showGrade: type === 'grade' }, others);
|
16 | }
|
17 |
|
18 | var _props2 = props,
|
19 | disabled = _props2.disabled,
|
20 | readOnly = _props2.readOnly;
|
21 |
|
22 | props.disabled = disabled || readOnly;
|
23 |
|
24 | return props;
|
25 | }
|
26 | }); |
\ | No newline at end of file |