@@ -26,12 +26,22 @@ export default class Progress extends Component {
2626 componentDidMount ( ) {
2727 this . element = $ ( this . refs . element ) ;
2828 this . element . progress ( {
29+ autoSuccess : this . props . autoSuccess ,
30+ children : this . props . children ,
31+ className : this . props . className ,
32+ label : this . props . label ,
33+ limitValues : this . props . limitValues ,
2934 onActive : this . props . onActive ,
3035 onChange : this . props . onChange ,
3136 onError : this . props . onError ,
3237 onSuccess : this . props . onSuccess ,
3338 onWarning : this . props . onWarning ,
3439 percent : this . props . percent ,
40+ precision : this . props . precision ,
41+ random : this . props . random ,
42+ showActivity : this . props . showActivity ,
43+ total : this . props . total ,
44+ value : this . props . value ,
3545 } ) ;
3646 }
3747
@@ -45,6 +55,25 @@ export default class Progress extends Component {
4555 return this . element . progress ( ...arguments ) ;
4656 }
4757
58+ renderAttachedBar ( ) {
59+ return (
60+ < div className = 'bar' />
61+ ) ;
62+ }
63+
64+ renderStandardBar ( ) {
65+ return (
66+ < div >
67+ < div className = 'bar' >
68+ < div className = 'progress' />
69+ </ div >
70+ < div className = 'label' >
71+ { this . props . children }
72+ </ div >
73+ </ div >
74+ ) ;
75+ }
76+
4877 render ( ) {
4978 const classes = classNames (
5079 'sd-progress' ,
@@ -53,12 +82,15 @@ export default class Progress extends Component {
5382 'progress' ,
5483 ) ;
5584
85+ let content = ::this . renderStandardBar ( ) ;
86+
87+ if ( this . props . className && this . props . className . indexOf ( 'attached' ) !== - 1 ) {
88+ content = ::this . renderAttachedBar ( ) ;
89+ }
90+
5691 return (
5792 < div { ...this . props } className = { classes } >
58- < div className = 'bar' >
59- < div className = 'progress' />
60- </ div >
61- { this . props . children }
93+ { content }
6294 </ div >
6395 ) ;
6496 }
0 commit comments