mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
fix: finished/error states cannot be indeterminate
This commit is contained in:
parent
cec3b0f450
commit
fdd57f02ba
1 changed files with 2 additions and 4 deletions
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
let helperId = "ccs-" + Math.random().toString(36);
|
let helperId = "ccs-" + Math.random().toString(36);
|
||||||
|
|
||||||
$: indeterminate = value === undefined;
|
$: indeterminate = value === undefined && status === "active";
|
||||||
$: capped = value > max ? max : value < 0 ? 0 : value;
|
$: capped = value > max ? max : value < 0 ? 0 : value;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -89,9 +89,7 @@
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class:bx--progress-bar__bar="{true}"
|
class:bx--progress-bar__bar="{true}"
|
||||||
style="{!indeterminate && status === 'active'
|
style:transform="{status === "active" && `scaleX(${capped / max})`}"
|
||||||
? `transform: scaleX(${capped / max})`
|
|
||||||
: ''}"
|
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
{#if helperText}
|
{#if helperText}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue