Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyo837 committed Jun 19, 2019
1 parent a38fe5d commit 0c72db0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ online example: http://react-component.github.io/steps/examples/
<td>spicify the default finish icon and error icon</td>
</tr>
<tr>
<td>showStepNum</td>
<td>showNumber</td>
<td>boolean</td>
<td></td>
<td>display step number, It will be ignored if icons is provided</td>
Expand Down Expand Up @@ -138,7 +138,7 @@ online example: http://react-component.github.io/steps/examples/
<td>set icon of step item</td>
</tr>
<tr>
<td>showStepNum</td>
<td>showNumber</td>
<td>boolean</td>
<td></td>
<td>display step number, It will be ignored if icon/icons is provided</td>
Expand Down
6 changes: 3 additions & 3 deletions src/Step.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class Step extends React.Component {
finish: PropTypes.node,
error: PropTypes.node,
}),
showStepNum: PropTypes.bool,
showNumber: PropTypes.bool,
onClick: PropTypes.func,
onStepClick: PropTypes.func,
};
Expand All @@ -54,7 +54,7 @@ export default class Step extends React.Component {
renderIconNode() {
const {
prefixCls, progressDot, stepNumber, status, title, description, icon,
iconPrefix, icons, showStepNum,
iconPrefix, icons, showNumber,
} = this.props;
let iconNode;
const iconClassName = classNames(`${prefixCls}-icon`, `${iconPrefix}icon`, {
Expand All @@ -81,7 +81,7 @@ export default class Step extends React.Component {
} else if (icons && icons.error && status === 'error') {
iconNode = <span className={`${prefixCls}-icon`}>{icons.error}</span>;
} else if (icon || status === 'finish' || status === 'error') {
iconNode = <span className={iconClassName}>{showStepNum ? stepNumber : ''}</span>;
iconNode = <span className={iconClassName}>{showNumber ? stepNumber : ''}</span>;
} else {
iconNode = <span className={`${prefixCls}-icon`}>{stepNumber}</span>;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Steps.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class Steps extends Component {
finish: PropTypes.node,
error: PropTypes.node,
}),
showStepNum: PropTypes.bool,
showNumber: PropTypes.bool,
onChange: PropTypes.func,
};
static defaultProps = {
Expand Down Expand Up @@ -102,7 +102,7 @@ export default class Steps extends Component {
const {
prefixCls, style = {}, className, children, direction,
labelPlacement, iconPrefix, status, size, current, progressDot, initial,
icons, onChange, showStepNum,
icons, onChange, showNumber,
...restProps,
} = this.props;
const { lastStepOffsetWidth, flexSupported } = this.state;
Expand Down Expand Up @@ -132,7 +132,7 @@ export default class Steps extends Component {
wrapperStyle: style,
progressDot,
icons,
showStepNum,
showNumber,
onStepClick: onChange && this.onStepClick,
...child.props,
};
Expand Down

0 comments on commit 0c72db0

Please sign in to comment.