@@ -59,7 +59,14 @@ const ProgressBar = React.createClass({
5959 }
6060
6161 return (
62- < div { ...this . props } className = { classNames ( this . props . className , 'progress' ) } >
62+ < div
63+ { ...this . props }
64+ className = { classNames ( this . props . className , 'progress' ) }
65+ min = { null }
66+ max = { null }
67+ label = { null }
68+ aria-valuetext = { null }
69+ >
6370 { content }
6471 </ div >
6572 ) ;
@@ -73,18 +80,14 @@ const ProgressBar = React.createClass({
7380 } ,
7481
7582 renderProgressBar ( ) {
83+ let { className, label, now, min, max, ...props } = this . props ;
84+
7685 const percentage = this . getPercentage (
77- this . props . now ,
78- this . props . min ,
79- this . props . max
86+ now , min , max
8087 ) ;
8188
82- let label ;
83-
84- if ( typeof this . props . label === 'string' ) {
89+ if ( typeof label === 'string' ) {
8590 label = this . renderLabel ( percentage ) ;
86- } else {
87- label = this . props . label ;
8891 }
8992
9093 if ( this . props . srOnly ) {
@@ -95,17 +98,17 @@ const ProgressBar = React.createClass({
9598 ) ;
9699 }
97100
98- const classes = classNames ( this . props . className , this . getBsClassSet ( ) , {
101+ const classes = classNames ( className , this . getBsClassSet ( ) , {
99102 active : this . props . active ,
100103 'progress-bar-striped' : this . props . active || this . props . striped
101104 } ) ;
102105
103106 return (
104107 < div
105- { ...this . props }
108+ { ...props }
106109 className = { classes }
107110 role = "progressbar"
108- style = { { width : percentage + '%' } }
111+ style = { { width : percentage + '%' } }
109112 aria-valuenow = { this . props . now }
110113 aria-valuemin = { this . props . min }
111114 aria-valuemax = { this . props . max } >
0 commit comments