-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(loader): update the react loader documentation
- Loading branch information
1 parent
ad75aaf
commit 6d30989
Showing
3 changed files
with
137 additions
and
42 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,119 @@ | ||
import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs'; | ||
import { Loader } from './Loader'; | ||
|
||
<Meta | ||
title="Sage/Loader" | ||
component={Loader} | ||
args={{ | ||
loading: true, | ||
}} | ||
/> | ||
|
||
# Loader | ||
|
||
Animated UI elements indicating that a page, section, or action is loading. | ||
|
||
## Usage Guidelines | ||
|
||
- | ||
- | ||
- | ||
|
||
### When to use | ||
|
||
- Communicate to the user that something is loading. | ||
- Any action that cannot be performed instantly and will require a short time to process. | ||
|
||
### When not to use | ||
|
||
## Accessibility | ||
|
||
## Properties | ||
|
||
<ArgsTable story="Default" /> | ||
|
||
### Types of Loaders | ||
- Bar | ||
- Spinner | ||
- Spinner in Button | ||
- Success | ||
- Typing | ||
|
||
## Variants | ||
|
||
### Default | ||
When using the compoennt in its default state, it will use the default type of `SPINNER` | ||
|
||
<Canvas> | ||
<Story name="Default"> | ||
<Loader loading={true} /> | ||
</Story> | ||
</Canvas> | ||
|
||
### Bar | ||
The continuous progress bar is used when the content and the indefinable loading progress of the system | ||
are to be displayed in the view at the same time. | ||
|
||
<Canvas> | ||
<Story name="Bar"> | ||
<Loader loading={true} type={Loader.TYPES.BAR} /> | ||
</Story> | ||
</Canvas> | ||
|
||
### Spinner | ||
The continuous spinner is used when loading progress cannont be determined. They indicate to the user | ||
with continuous movement that the system is still processing. | ||
|
||
<Canvas> | ||
<Story name="Spinner"> | ||
<Loader loading={true} type={Loader.TYPES.SPINNER} /> | ||
</Story> | ||
</Canvas> | ||
|
||
### Success | ||
|
||
|
||
<Canvas> | ||
<Story name="Success"> | ||
<Loader loading={true} type={Loader.TYPES.SUCCESS} /> | ||
</Story> | ||
</Canvas> | ||
|
||
|
||
### Typing | ||
This loading indictator is good when you want to provide feedback to the user that they are typing. | ||
|
||
<Canvas> | ||
<Story name="Typing"> | ||
<Loader loading={true} type={Loader.TYPES.TYPING} /> | ||
</Story> | ||
</Canvas> | ||
|
||
## Additional Properties | ||
|
||
### Fill Space | ||
<Canvas> | ||
<Story name="Fill Space"> | ||
<div> | ||
<Loader loading={true} fillSpace={true} /> | ||
</div> | ||
</Story> | ||
</Canvas> | ||
|
||
### Hide when Done | ||
|
||
<Canvas> | ||
<Story name="Hide When Done"> | ||
<div> | ||
<Loader hideWhenDone={true} /> | ||
</div> | ||
</Story> | ||
</Canvas> | ||
|
||
### Label | ||
|
||
<Canvas> | ||
<Story name="Label"> | ||
<Loader loading={true} label="My loading label...." types={Loader.TYPES.BAR} /> | ||
</Story> | ||
</Canvas> |