File tree Expand file tree Collapse file tree 5 files changed +148
-124
lines changed
components/atom/progressBar/src Expand file tree Collapse file tree 5 files changed +148
-124
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,8 @@ const Circle = ({
6666 >
6767 < path
6868 className = { cx ( `${ baseClassName } -trail` , {
69- [ `${ baseClassName } -trail--${ modifier } ` ] : ! ! modifier
69+ [ `${ baseClassName } -trail--${ modifier } ` ] : ! ! modifier ,
70+ [ `${ baseClassName } -trail--color-${ color } ` ] : ! ! color
7071 } ) }
7172 { ...getPathStyles ( { percentage : 100 , strokeWidth : mainStrokeWidth } ) }
7273 strokeWidth = { mainStrokeWidth }
Original file line number Diff line number Diff line change @@ -143,6 +143,13 @@ $base-class-circle: '#{$base-class}Circle';
143143 & --success {
144144 stroke : $c-atom-circle-progress-bar-trail--success ;
145145 }
146+ & #{$base-class-circle } -trail--color {
147+ @each $colorName , $colorValue in $c-progress-bar-fill-array {
148+ & -#{$colorName} {
149+ stroke : color-mix (in srgb , $c-white , $colorValue 16% );
150+ }
151+ }
152+ }
146153 }
147154
148155 & -path {
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ const ProgressBarLine = ({
4848 [ `${ CLASS_CONTAINER_BAR } --borderless` ] : isBorderless ,
4949 [ `${ CLASS_CONTAINER_BAR } --success` ] : status === STATUS . SUCCESS ,
5050 [ `${ CLASS_CONTAINER_BAR } --error` ] : status === STATUS . ERROR ,
51- [ `${ CLASS_CONTAINER_BAR } --loading` ] : status === STATUS . LOADING
51+ [ `${ CLASS_CONTAINER_BAR } --loading` ] : status === STATUS . LOADING ,
52+ [ `${ CLASS_CONTAINER_BAR } --color-${ color } ` ] : color
5253 } ) }
5354 >
5455 { percentageArray . map ( ( percentageValue , currentIndex , array ) => {
Original file line number Diff line number Diff line change @@ -27,9 +27,19 @@ $base-class-line: '#{$base-class}Line';
2727 height : $h-progress-bar ; /* Can be anything */
2828 position : relative ;
2929 box-sizing : border-box ;
30- @each $size-key , $size-value in $size-atom-line-progress-bar {
31- & --size -#{$size-key } {
32- height : $size-value ;
30+ & --size {
31+ @each $size-key , $size-value in $size-atom-line-progress-bar {
32+ & -#{$size-key} {
33+ height : $size-value ;
34+ }
35+ }
36+ }
37+ & --color {
38+ @each $colorName , $colorValue in $c-progress-bar-fill-array {
39+ & -#{$colorName} {
40+ background-color : color-mix (in srgb , $c-white , $colorValue 16% );
41+ border-color : color-mix (in srgb , $bc-progress-bar , $colorValue 16% );
42+ }
3343 }
3444 }
3545 }
You can’t perform that action at this time.
0 commit comments