choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
83 lines (68 loc) • 2.19 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _inherits from "@babel/runtime/helpers/inherits";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
function _createSuper(Derived) {
function isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
return true;
} catch (e) {
return false;
}
}
return function () {
var Super = _getPrototypeOf(Derived),
result;
if (isNativeReflectConstruct()) {
var NewTarget = _getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return _possibleConstructorReturn(this, result);
};
}
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import RcSteps, { Step, StepGroup } from '../rc-components/steps';
import { getPrefixCls } from '../configure';
var Steps =
/*#__PURE__*/
function (_Component) {
_inherits(Steps, _Component);
var _super = _createSuper(Steps);
function Steps() {
_classCallCheck(this, Steps);
return _super.apply(this, arguments);
}
_createClass(Steps, [{
key: "render",
value: function render() {
var props = this.props;
return React.createElement(RcSteps, _extends({}, props, {
prefixCls: getPrefixCls('steps', props.prefixCls)
}));
}
}]);
return Steps;
}(Component);
export { Steps as default };
Steps.displayName = 'Steps';
Steps.Step = Step;
Steps.StepGroup = StepGroup;
Steps.defaultProps = {
iconPrefix: 'icon',
current: 0
};
Steps.propTypes = {
prefixCls: PropTypes.string,
iconPrefix: PropTypes.string,
current: PropTypes.number
};
//# sourceMappingURL=index.js.map