carbon-components-svelte/tests/ProgressBar.test.svelte
Jonathan Quintin 7ddbf17cbb
feat(progress-bar): add status prop (#1560)
* ProgressBar status feature added

* ProgressBar: Removed the css variables and use carbon-css instead.
The way of assigning the ProgressBar value has change. It is now a style
variable and scale-x is calculated in the css. This way prevent the
override of carbon css.

* Removed an unessacery span.

* Removed an unnecessary span.

* Added the status for the ProgressBarUx

* Remove `style css` and update docs.

* - Fixed the `capped` variable for more readability
- Updated docs `label` and `helperText`
- Updated docs and css

* fix: finished/error states cannot be indeterminate

* Run "yarn build:css"

* Re-run "yarn build:docs"

* test(progress-bar): assert `status` prop

* chore: add aria-busy and set valuenow to 0 when not active

---------

Co-authored-by: Eric Liu <ericyl.us@gmail.com>
Co-authored-by: Enrico Sacchetti <enrico@theetrain.ca>
2023-02-19 12:34:41 -05:00

16 lines
277 B
Svelte

<script lang="ts">
import { ProgressBar } from "../types";
</script>
<ProgressBar helperText="Loading..." />
<ProgressBar
kind="inline"
size="md"
value="{40}"
max="{100}"
labelText="Upload status"
hideLabel
helperText="40 MB of 100 MB"
status="finished"
/>