| 1 |
--- |
| 2 |
id: Progress |
| 3 |
section: components |
| 4 |
--- |
| 5 |
import { useState } from 'react'; |
| 6 |
import accessibilityStyles from '@patternfly/react-styles/css/utilities/Accessibility/accessibility'; |
| 7 |
|
| 8 |
## Demos |
| 9 |
|
| 10 |
### Basic |
| 11 |
|
| 12 |
```ts file="examples/Progress/ProgressBasic.tsx" |
| 13 |
|
| 14 |
``` |
| 15 |
|
| 16 |
### With only increasing progress |
| 17 |
|
| 18 |
Sometimes a progress bar should only show increases to progress state. In this case, before the next value is set it should be checked against the current progress. The `Decrease progress` button attempts to set a lower progress value, simulating an update to a progress state that isn't desired, but won't change the progress state due to this check. |
| 19 |
|
| 20 |
```ts file="examples/Progress/ProgressWithOnlyIncreasing.tsx" |
| 21 |
|
| 22 |
``` |