@alifd/next
Version:
A configurable component library for web built on React.
20 lines (16 loc) • 687 B
JavaScript
import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import ConfigProvider from '../config-provider';
import Rating from './rating';
export default ConfigProvider.config(Rating, {
transform: /* istanbul ignore next */function transform(props, deprecated) {
if ('type' in props) {
deprecated('type', 'showGrade', 'Rating');
var _props = props,
type = _props.type,
others = _objectWithoutProperties(_props, ['type']);
props = _extends({ showGrade: type === 'grade' }, others);
}
return props;
}
});