mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36: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);
|
||||
|
||||
$: indeterminate = value === undefined;
|
||||
$: indeterminate = value === undefined && status === "active";
|
||||
$: capped = value > max ? max : value < 0 ? 0 : value;
|
||||
</script>
|
||||
|
||||
|
@ -89,9 +89,7 @@
|
|||
>
|
||||
<div
|
||||
class:bx--progress-bar__bar="{true}"
|
||||
style="{!indeterminate && status === 'active'
|
||||
? `transform: scaleX(${capped / max})`
|
||||
: ''}"
|
||||
style:transform="{status === "active" && `scaleX(${capped / max})`}"
|
||||
></div>
|
||||
</div>
|
||||
{#if helperText}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue