-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore/storybook/person/avtar/data source (#2432)
* docs(person-avatar): avatar example with dataSource * chore: changeset * docs(personAvatar): adding additional info to usage of dataSource
- Loading branch information
Showing
4 changed files
with
61 additions
and
6 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,5 @@ | ||
--- | ||
'@equinor/fusion-react-components-stories': patch | ||
--- | ||
|
||
Updating PersonAvatar story with dataSource |
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,31 @@ | ||
import { Meta, Markdown, ArgTypes, Canvas } from '@storybook/blocks'; | ||
import * as avatarStories from './avatar.stories'; | ||
|
||
|
||
<Meta title="Person/Avatar" /> | ||
|
||
## Avatar | ||
<ArgTypes of={ avatarStories.basic } /> | ||
|
||
### Basic | ||
<Canvas of={ avatarStories.basic } meta={avatarStories} story={{height: '350px'}}/> | ||
|
||
### Sizes | ||
<Canvas of={ avatarStories.sizes } meta={avatarStories} story={{height: '350px'}}/> | ||
|
||
### withDataSource | ||
|
||
The avatar will not resolve any data about the user when using property `dataSource`, so the persons avatar will be the users initial as provided in `dataSource`. | ||
|
||
When using `dataSource` be sure to add the property `trigger="none"` to prevent the personCard from opening when hovering/clicking on the avatar since it will not resolve a user. | ||
|
||
<Canvas of={ avatarStories.withDataSource } meta={avatarStories} story={{height: '350px'}}/> | ||
|
||
### Clickable | ||
<Canvas of={ avatarStories.clickable } meta={avatarStories} story={{height: '350px'}}/> | ||
|
||
### Trigger none | ||
<Canvas of={ avatarStories.disableCard } meta={avatarStories}/> | ||
|
||
### disabled | ||
<Canvas of={ avatarStories.disabled } meta={avatarStories} /> |
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