File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed
packages/core/src/Progress Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -83,18 +83,20 @@ const Progress: React.FC<ProgressProps> = ({
83
83
84
84
return (
85
85
< View >
86
- < Svg width = { width } height = { width / 3 } >
87
- < Defs >
88
- < LinearGradient id = "grad" x1 = "0" y1 = "0" x2 = "1" y2 = "0" >
89
- < Stop offset = "0" stopColor = { typeof color === 'string' ? color : color [ 0 ] } stopOpacity = "1" />
90
- < Stop offset = "1" stopColor = { typeof color === 'string' ? color : color [ 1 ] } stopOpacity = "1" />
91
- </ LinearGradient >
92
- </ Defs >
93
- < G origin = { `${ width / 2 } , ${ width / 2 } ` } >
94
- < Rect x = { 0 } y = { 0 } width = { width } height = { strokeWidth } rx = { strokeWidth / 2 } fill = { bgColor } />
95
- < AnimatedRect x = { 0 } y = { 0 } width = { progress } height = { strokeWidth } rx = { strokeWidth / 2 } fill = "url(#grad)" />
96
- </ G >
97
- </ Svg >
86
+ < View >
87
+ < Svg width = { width } height = { showLabel ? width / 3 : strokeWidth } >
88
+ < Defs >
89
+ < LinearGradient id = "grad" x1 = "0" y1 = "0" x2 = "1" y2 = "0" >
90
+ < Stop offset = "0" stopColor = { typeof color === 'string' ? color : color [ 0 ] } stopOpacity = "1" />
91
+ < Stop offset = "1" stopColor = { typeof color === 'string' ? color : color [ 1 ] } stopOpacity = "1" />
92
+ </ LinearGradient >
93
+ </ Defs >
94
+ < G origin = { `${ width / 2 } , ${ width / 2 } ` } >
95
+ < Rect x = { 0 } y = { 0 } width = { width } height = { strokeWidth } rx = { strokeWidth / 2 } fill = { bgColor } />
96
+ < AnimatedRect x = { 0 } y = { 0 } width = { progress } height = { strokeWidth } rx = { strokeWidth / 2 } fill = "url(#grad)" />
97
+ </ G >
98
+ </ Svg >
99
+ </ View >
98
100
{ progressLabel }
99
101
</ View >
100
102
) ;
You can’t perform that action at this time.
0 commit comments