Skip to content

Commit e250d75

Browse files
Progress indicator: Remove activeStep from docs
1 parent 32e30c8 commit e250d75

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

components/progress-indicator/index.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,13 @@ const propTypes = {
2424
/**
2525
* **Assistive text for accessibility**
2626
* This object is merged with the default props object on every render.
27-
* * `activeStep`: Label for the active step. The default is `Active Step`
2827
* * `completedStep`: Label for a completed step. The default is `Completed Step`
2928
* * `disabledStep`: Label for disabled step. The default is `Disabled Step`
3029
* * `errorStep`: Label for a step with an error. The default is `Error Step`
3130
* * `percentage`: Label for Progress Bar. The default is `Progress: [this.props.value]%`. You will need to calculate the percentage yourself if changing this string.
3231
* * `step`: Label for a step. It will be typically followed by the number of the step such as "Step 1".
3332
*/
3433
assistiveText: PropTypes.shape({
35-
activeStep: PropTypes.string,
3634
completedStep: PropTypes.string,
3735
disabledStep: PropTypes.string,
3836
percentage: PropTypes.string,
@@ -177,9 +175,10 @@ class ProgressIndicator extends React.Component {
177175

178176
render () {
179177
// Merge objects of strings with their default object
180-
const assistiveText = this.props
181-
? { ...defaultProps.assistiveText, ...this.props.assistiveText }
182-
: defaultProps.assistiveText;
178+
const assistiveText = {
179+
...defaultProps.assistiveText,
180+
...this.props.assistiveText,
181+
};
183182

184183
const {
185184
selectedStep,

components/progress-indicator/private/step.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class Step extends React.Component {
132132
{this.props.step.assistiveText ||
133133
`${props.assistiveText.step} ${props.index + 1}: ${
134134
props.step.label
135-
} ${status}`}
135+
} - ${status}`}
136136
</span>
137137
</a>
138138
) : (
@@ -166,11 +166,11 @@ class Step extends React.Component {
166166
const renderIcon = this.props.isCompleted || this.props.isError;
167167
let status = '';
168168
if (this.props.isError) {
169-
status = `- ${this.props.assistiveText.errorStep}`;
169+
status = this.props.assistiveText.errorStep;
170170
} else if (this.props.isCompleted) {
171-
status = `- ${this.props.assistiveText.completedStep}`;
171+
status = this.props.assistiveText.completedStep;
172172
} else if (this.props.isDisabled) {
173-
status = `- ${this.props.assistiveText.disabledStep}`;
173+
status = this.props.assistiveText.disabledStep;
174174
}
175175

176176
const tooltipProps = {

0 commit comments

Comments
 (0)