oa-componentbook 1.0.1-stage.433 → 1.0.1-stage.434
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,6 +18,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
18
18
|
* @param {number} totalStep - The total number of steps in the progress.
|
|
19
19
|
* @param {string} headingColor - The color used for the step text heading.
|
|
20
20
|
* @param {string} barColor - The color used for the progress bar.
|
|
21
|
+
* @param {boolean} showStepText - Whether to display the step text (Step X out of Y).
|
|
21
22
|
*
|
|
22
23
|
* @returns {React.ReactElement} A component displaying the current progress.
|
|
23
24
|
*/
|
|
@@ -26,9 +27,10 @@ function ProgressBar(_ref) {
|
|
|
26
27
|
currentStep,
|
|
27
28
|
totalStep,
|
|
28
29
|
headingColor,
|
|
29
|
-
barColor
|
|
30
|
+
barColor,
|
|
31
|
+
showStepText
|
|
30
32
|
} = _ref;
|
|
31
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showStepText && /*#__PURE__*/_react.default.createElement("div", {
|
|
32
34
|
className: "margin-bottom-8"
|
|
33
35
|
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
34
36
|
color: headingColor,
|
|
@@ -57,12 +59,14 @@ ProgressBar.propTypes = {
|
|
|
57
59
|
currentStep: _propTypes.default.number,
|
|
58
60
|
totalStep: _propTypes.default.number,
|
|
59
61
|
headingColor: _propTypes.default.string,
|
|
60
|
-
barColor: _propTypes.default.string
|
|
62
|
+
barColor: _propTypes.default.string,
|
|
63
|
+
showStepText: _propTypes.default.bool
|
|
61
64
|
};
|
|
62
65
|
ProgressBar.defaultProps = {
|
|
63
66
|
currentStep: 1,
|
|
64
67
|
totalStep: 1,
|
|
65
68
|
headingColor: 'positive',
|
|
66
|
-
barColor: 'positive'
|
|
69
|
+
barColor: 'positive',
|
|
70
|
+
showStepText: true
|
|
67
71
|
};
|
|
68
72
|
var _default = exports.default = ProgressBar;
|