File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
components/src/components/progress
samples/react/src/components/progress Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ export class KolProgress implements ProgressAPI {
116116 </ div >
117117 ) }
118118 { this . state . _variant == 'bar' && (
119- < div class = "kol-progress__bar-value" style = { { width : `${ `${ this . state . _max } ` . length } ch` } } >
119+ < div class = "kol-progress__bar-value" style = { { width : `${ `${ ( isPercentage ? 100 : this . state . _max ) + 1 } ` . length } ch` } } >
120120 { displayValue }
121121 </ div >
122122 ) }
Original file line number Diff line number Diff line change @@ -13,15 +13,15 @@ export const ProgressBasic: FC = () => (
1313
1414 < div className = "grid gap-4 grid-cols-1 sm:grid-cols-2" >
1515 < fieldset title = "Percentages" className = "flex flex-col gap-4" >
16- < KolProgress _variant = "bar" _max = { 100 } _value = { 0 } > </ KolProgress >
17- < KolProgress _variant = "bar" _max = { 100 } _value = { 17 } > </ KolProgress >
18- < KolProgress _variant = "bar" _max = { 100 } _value = { 100 } > </ KolProgress >
19- < KolProgress _variant = "cycle" _max = { 100 } _value = { 85 } > </ KolProgress >
16+ < KolProgress _variant = "bar" _max = { 7 } _value = { 0 } > </ KolProgress >
17+ < KolProgress _variant = "bar" _max = { 7 } _value = { 2 } > </ KolProgress >
18+ < KolProgress _variant = "bar" _max = { 7 } _value = { 7 } > </ KolProgress >
19+ < KolProgress _variant = "cycle" _max = { 7 } _value = { 6 } > </ KolProgress >
2020 </ fieldset >
2121 < fieldset title = "Custom units" className = "flex flex-col gap-4" >
2222 < KolProgress _label = "Distance" _variant = "bar" _max = { 65434 } _value = { 7236 } _unit = "m" > </ KolProgress >
2323 < KolProgress _label = "12 Tasks to do" _variant = "bar" _max = { 12 } _value = { 5 } _unit = "tasks completed" > </ KolProgress >
24- < KolProgress _label = "Max 150 kg" _variant = "cycle" _max = { 150 } _value = { 134 } _unit = "kg" > </ KolProgress >
24+ < KolProgress _label = "Max 150 kg" _variant = "cycle" _max = { 150 } _value = { 42 } _unit = "kg" > </ KolProgress >
2525 </ fieldset >
2626 </ div >
2727 </ >
You can’t perform that action at this time.
0 commit comments