-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: address second round of review comments - to be squashed
- Loading branch information
1 parent
2efff85
commit fb89d2e
Showing
5 changed files
with
131 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
// component preview locators | ||
export const PROGRESS_TRACKER = '[data-component="progress-bar"]'; | ||
export const PROGRESS_TRACKER_LINE = '[data-element="inner-bar"]'; | ||
export const PROGRESS_TRACKER_CURRENT_VALUE = | ||
'[data-element="current-progress-label"]'; | ||
export const PROGRESS_TRACKER_MAX_VALUE = '[data-element="max-progress-label"]'; | ||
export const PROGRESS_TRACKER_CUSTOM_VALUE_PREPOSITION = | ||
'[data-element="custom-preposition"]'; | ||
export const PROGRESS_TRACKER_DESCRIPTION = | ||
'[data-element="progress-tracker-description"]'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,34 @@ | ||
import React from "react"; | ||
import ProgressTracker, { ProgressTrackerProps } from "."; | ||
import Box from "../box"; | ||
|
||
export const Default = (args: ProgressTrackerProps) => { | ||
return <ProgressTracker {...args} />; | ||
}; | ||
|
||
export const ProgressTrackerComponent = (props: ProgressTrackerProps) => { | ||
return <ProgressTracker progress={50} showDefaultLabels {...props} />; | ||
}; | ||
|
||
export const AccessibilityExample = () => { | ||
return ( | ||
<Box display="flex" justifyContent="space-around"> | ||
<ProgressTracker | ||
currentProgressLabel="50%" | ||
progress={50} | ||
aria-valuemin={100} | ||
aria-valuenow={150} | ||
aria-valuemax={200} | ||
aria-valuetext="$150" | ||
/> | ||
</Box> | ||
); | ||
}; | ||
|
||
export const AccessibilityExampleTwo = () => { | ||
return ( | ||
<Box display="flex" justifyContent="space-around"> | ||
<ProgressTracker progress={50} aria-valuemin={111} aria-valuemax={188} /> | ||
</Box> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters