-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(asset,assetcard,avatar,badge): site docs to storybook (#2782)
* docs(asset): site docs to storybook * docs(assetcard): site docs to storybook * docs(avatar): site docs to storybook * docs(badge): site docs to storybook * docs: show argtypes instead of controls on docs page * docs(avatar): different example avatar
- Loading branch information
Showing
7 changed files
with
295 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { ArgTypes, Canvas, Meta, Description, Title } from '@storybook/blocks'; | ||
|
||
import * as AssetStories from './asset.stories'; | ||
|
||
<Meta of={AssetStories} title="Docs" /> | ||
|
||
<Title of={AssetStories} /> | ||
<Description of={AssetStories} /> | ||
|
||
## Variants | ||
|
||
### Image | ||
|
||
<Canvas of={AssetStories.Default} /> | ||
|
||
### File | ||
|
||
<Canvas of={AssetStories.File} /> | ||
|
||
### Folder | ||
|
||
<Canvas of={AssetStories.Folder} /> | ||
|
||
## Properties | ||
|
||
<ArgTypes /> |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { ArgTypes, Canvas, Meta, Description, Title } from '@storybook/blocks'; | ||
|
||
import * as AssetCardStories from './assetcard.stories'; | ||
|
||
<Meta of={AssetCardStories} title="Docs" /> | ||
|
||
<Title of={AssetCardStories} /> | ||
<Description of={AssetCardStories} /> | ||
|
||
## Portrait | ||
|
||
<Canvas of={AssetCardStories.Portrait} /> | ||
|
||
## Landscape | ||
|
||
<Canvas of={AssetCardStories.Landscape} /> | ||
|
||
## Square | ||
|
||
<Canvas of={AssetCardStories.Square} /> | ||
|
||
## Optional Content | ||
|
||
<Canvas of={AssetCardStories.OptionalContent} /> | ||
|
||
## Highlight Selection | ||
|
||
<Canvas of={AssetCardStories.HighlightSelection} /> | ||
|
||
## Checkbox Selection | ||
|
||
<Canvas of={AssetCardStories.CheckboxSelection} /> | ||
|
||
## Ordered Selection | ||
|
||
<Canvas of={AssetCardStories.OrderedSelection} /> | ||
|
||
## Drop Target | ||
|
||
<Canvas of={AssetCardStories.DropTarget} /> | ||
|
||
## Properties | ||
|
||
<ArgTypes /> |
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,42 @@ | ||
import { ArgTypes, Canvas, Meta, Description, Title } from '@storybook/blocks'; | ||
|
||
import * as AvatarStories from './avatar.stories'; | ||
|
||
<Meta of={AvatarStories} title="Docs" /> | ||
|
||
<Title of={AvatarStories} /> | ||
<Description of={AvatarStories} /> | ||
|
||
<Canvas of={AvatarStories.Default} /> | ||
|
||
## Sizes | ||
|
||
Avatar is available in many sizes using the required `.spectrum-Avatar--size<number>` class. The available size classes are: | ||
|
||
- `spectrum-Avatar--size50` | ||
- `spectrum-Avatar--size75` | ||
- `spectrum-Avatar--size100` | ||
- `spectrum-Avatar--size200` | ||
- `spectrum-Avatar--size300` | ||
- `spectrum-Avatar--size400` | ||
- `spectrum-Avatar--size500` | ||
- `spectrum-Avatar--size600` | ||
- `spectrum-Avatar--size700` | ||
|
||
<Canvas of={AvatarStories.SizeOptions} /> | ||
|
||
## No Link | ||
|
||
An avatar image is wrapped in a link that uses the `.spectrum-Avatar-link` class by default, however, an avatar may also be used without a link. | ||
|
||
<Canvas of={AvatarStories.NoLink} /> | ||
|
||
## Disabled | ||
|
||
When disabled, the avatar should only be used without a link. | ||
|
||
<Canvas of={AvatarStories.Disabled} /> | ||
|
||
## Properties | ||
|
||
<ArgTypes /> |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { ArgTypes, Canvas, Meta, Description, Title } from '@storybook/blocks'; | ||
|
||
import * as BadgeStories from './badge.stories'; | ||
|
||
<Meta of={BadgeStories} title="Docs" /> | ||
|
||
<Title of={BadgeStories} /> | ||
<Description of={BadgeStories} /> | ||
|
||
## Default | ||
|
||
Badges can contain label, icon, or label and icon. Text wrapping is also included when a `max-width` is applied to the badge. | ||
|
||
<Canvas of={BadgeStories.Default} /> | ||
|
||
## Semantic | ||
|
||
<Canvas of={BadgeStories.SemanticVariants} /> | ||
|
||
## Non-semantic | ||
|
||
<Canvas of={BadgeStories.NonSemanticVariants} /> | ||
|
||
## Fixed edge | ||
|
||
The border radius is 0 along the fixed edge of the component. The actual component position is not represented on this page. | ||
|
||
<Canvas of={BadgeStories.FixedVariants} /> | ||
|
||
## Properties | ||
|
||
<ArgTypes /> |
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