diff --git a/src/ProgressBar.js b/src/ProgressBar.js
index fa0868317a..c5f153370c 100644
--- a/src/ProgressBar.js
+++ b/src/ProgressBar.js
@@ -59,7 +59,14 @@ const ProgressBar = React.createClass({
}
return (
-
+
{content}
);
@@ -73,18 +80,14 @@ const ProgressBar = React.createClass({
},
renderProgressBar() {
+ let { className, label, now, min, max, ...props } = this.props;
+
const percentage = this.getPercentage(
- this.props.now,
- this.props.min,
- this.props.max
+ now, min, max
);
- let label;
-
- if (typeof this.props.label === 'string') {
+ if (typeof label === 'string') {
label = this.renderLabel(percentage);
- } else {
- label = this.props.label;
}
if (this.props.srOnly) {
@@ -95,17 +98,17 @@ const ProgressBar = React.createClass({
);
}
- const classes = classNames(this.props.className, this.getBsClassSet(), {
+ const classes = classNames(className, this.getBsClassSet(), {
active: this.props.active,
'progress-bar-striped': this.props.active || this.props.striped
});
return (