@@ -26,12 +26,22 @@ export default class Progress extends Component {
26
26
componentDidMount ( ) {
27
27
this . element = $ ( this . refs . element ) ;
28
28
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 ,
29
34
onActive : this . props . onActive ,
30
35
onChange : this . props . onChange ,
31
36
onError : this . props . onError ,
32
37
onSuccess : this . props . onSuccess ,
33
38
onWarning : this . props . onWarning ,
34
39
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 ,
35
45
} ) ;
36
46
}
37
47
@@ -45,6 +55,25 @@ export default class Progress extends Component {
45
55
return this . element . progress ( ...arguments ) ;
46
56
}
47
57
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
+
48
77
render ( ) {
49
78
const classes = classNames (
50
79
'sd-progress' ,
@@ -53,12 +82,15 @@ export default class Progress extends Component {
53
82
'progress' ,
54
83
) ;
55
84
85
+ let content = ::this . renderStandardBar ( ) ;
86
+
87
+ if ( this . props . className && this . props . className . indexOf ( 'attached' ) !== - 1 ) {
88
+ content = ::this . renderAttachedBar ( ) ;
89
+ }
90
+
56
91
return (
57
92
< div { ...this . props } className = { classes } >
58
- < div className = 'bar' >
59
- < div className = 'progress' />
60
- </ div >
61
- { this . props . children }
93
+ { content }
62
94
</ div >
63
95
) ;
64
96
}
0 commit comments