mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 23:03:32 +00:00
Storybook docs (#5552)
* updated sort order
* Update preview.tsx
* Create avatar.mdx
Added avatar documentation based on Figma docs
* Added badge docs
* fixed typos
* added breadcrumb docs
* Added callout docs
* added color password docs
* Added dialog docs
* fixed typo
* Updated Dialogs docs
Added a dialogs.mdx page for general docs that apply to both main Dialogs and Simple Dialogs.
Updated the sub-docs pages
* Update simple-dialog.mdx
* Added documentation from Figma to Forms docs
* Create icon-button.mdx
* added link docs
* Added menu docs
* Added progress indicator docs
* Updated table docs
* Added tab docs
* Added toggle group docs
* Revert "Update preview.tsx"
This reverts commit 4671d9726a.
* added docs for appA11yTitle
* Fixed typos
* Update libs/components/src/link/link.mdx
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
* Update libs/components/src/menu/menu.mdx
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
* Addressed feedback
* Addressed feedback on callout, menu, and progress
* moved stories mdx files to proper location
* Addressed feedback on dialogs.mdx
* Update libs/components/src/tabs/tabs.mdx
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
* Addressed feedback on Tabs
* ran prettier
* Fixed title formatting
* ran prettier
* Update libs/components/src/dialog/dialogs.mdx
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
* ran prettier
---------
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
This commit is contained in:
48
libs/components/src/progress/progress.mdx
Normal file
48
libs/components/src/progress/progress.mdx
Normal file
@@ -0,0 +1,48 @@
|
||||
import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
|
||||
|
||||
import * as stories from "./progress.stories";
|
||||
|
||||
<Meta of={stories} />
|
||||
|
||||
# Progress
|
||||
|
||||
Progress indicators may be used to visually indicate progress or to visually measure some other
|
||||
value, such as a password strength indicator.
|
||||
|
||||
<Primary />
|
||||
<Controls />
|
||||
|
||||
## Labels
|
||||
|
||||
Always display a label to provide a text based description of what the indicator is measuring. This
|
||||
allows those who may not be familiar with the pattern to be able to read and digest the information.
|
||||
It also allows assistive technology to accurately describe the indicator to those who may be unable
|
||||
to see part or all of the indicator.
|
||||
|
||||
<Story of={stories.Full} />
|
||||
|
||||
## Text label
|
||||
|
||||
When measuring something other than progress, such as password strength, update the label to fit the
|
||||
context of the implementation.
|
||||
|
||||
<Story of={stories.CustomText} />
|
||||
|
||||
### Strength indicator styles
|
||||
|
||||
For a strength indicator use the following styles for fill:
|
||||
|
||||
- **Weak:** `danger-500`
|
||||
- **Weak2:** `warning-500`
|
||||
- **Good:** `primary-500`
|
||||
- **Strong:** `success-500`
|
||||
|
||||
## Accessibility
|
||||
|
||||
Be sure to include the proper `aria-valuemin`, `aria-valuemax`, and `aria-valuenow` attributes. An
|
||||
a`ria-valuetext` should also be configurable to include the text a screen reader should read to the
|
||||
user.
|
||||
|
||||
In the case of a password strength indicator; `aria-describedby` is used on the password field and
|
||||
points to the `id` of the progress bar. This results in the screen reader reading the password
|
||||
strength to the user after they finish typing.
|
||||
Reference in New Issue
Block a user