-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4986 from open-formulieren/chore/4908-document-bo…
…olean-icons 📝 Document boolean icons in admin
- Loading branch information
Showing
3 changed files
with
37 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import {ArgTypes, Canvas, Meta} from '@storybook/addon-docs'; | ||
|
||
import * as BooleanIconsStories from './BooleanIcons.stories'; | ||
|
||
<Meta of={BooleanIconsStories} /> | ||
|
||
# Boolean icons | ||
|
||
You can use boolean icons to quickly represent the state of a boolean. Booleans are tri-state: | ||
`true`, `false` or `null`. | ||
|
||
<Canvas of={BooleanIconsStories.Yes} /> | ||
|
||
<Canvas of={BooleanIconsStories.No} /> | ||
|
||
<Canvas of={BooleanIconsStories.Unknown} /> |
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,18 @@ | ||
import BooleanIcon, {IconNo, IconUnknown, IconYes} from './BooleanIcons'; | ||
|
||
export default { | ||
title: 'Admin / Django / BooleanIcons', | ||
component: BooleanIcon, | ||
}; | ||
|
||
export const Yes = { | ||
render: () => <IconYes />, | ||
}; | ||
|
||
export const No = { | ||
render: () => <IconNo />, | ||
}; | ||
|
||
export const Unknown = { | ||
render: () => <IconUnknown />, | ||
}; |