-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update storybook metadata creation to support Knobs in docs app (#48)
* Update storybook metadata creation to support Knobs in docs app * Adding additional stories * Version bump * Add github token to action
- Loading branch information
Showing
11 changed files
with
174 additions
and
8 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
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,37 @@ | ||
import React from 'react' | ||
|
||
import { withKnobs, text, boolean, select } from '@storybook/addon-knobs' | ||
import Drawer from '../../src/drawer/Drawer' | ||
|
||
export default { title: 'Drawer', decorators: [withKnobs] } | ||
|
||
export const defaults = () => ( | ||
<> | ||
<div>Use the knobs to open the drawer.</div> | ||
<div>Knobs can be adjusted when the drawer is closed.</div> | ||
<Drawer | ||
open={boolean('Open', false)} | ||
fullscreen={boolean('Fullscreen', true)} | ||
anchor={select( | ||
'Anchor', | ||
{ Top: 'top', Bottom: 'bottom', Left: 'left', Right: 'right' }, | ||
'bottom', | ||
)} | ||
title={text('Title', 'Example Drawer')} | ||
showCloseButton={boolean('Close Button', true)} | ||
> | ||
<div | ||
style={{ | ||
height: 200, | ||
margin: 50, | ||
backgroundColor: 'silver', | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}} | ||
> | ||
These are the drawer contents | ||
</div> | ||
</Drawer> | ||
</> | ||
) |
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,20 @@ | ||
import React from 'react' | ||
|
||
import { withKnobs, boolean, select } from '@storybook/addon-knobs' | ||
import LoadMask from '../../src/LoadMask' | ||
|
||
export default { title: 'LoadMask', decorators: [withKnobs] } | ||
|
||
export const defaults = () => ( | ||
<div> | ||
<LoadMask | ||
show={boolean('Show', true)} | ||
transparent={boolean('Transparent', true)} | ||
align={select('Align', { Center: 'center', Top: 'top' }, 'center')} | ||
/> | ||
<div style={{ padding: 30 }}>This content is being masked.</div> | ||
<div style={{ padding: 30, backgroundColor: 'steelblue', color: 'white' }}> | ||
This content is also being masked. | ||
</div> | ||
</div> | ||
) |
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,40 @@ | ||
import React from 'react' | ||
import ResponsiveTiles from '../../src/ResponsiveTiles' | ||
|
||
export default { title: 'ResponsiveTiles' } | ||
|
||
const data = [ | ||
{ color: 'red', textColor: 'white', label: 'Tile 1' }, | ||
{ color: 'black', textColor: 'white', label: 'Tile 2' }, | ||
{ color: 'blue', textColor: 'white', label: 'Tile 3' }, | ||
{ color: 'skyblue', textColor: 'black', label: 'Tile 4' }, | ||
{ color: 'purple', textColor: 'white', label: 'Tile 5' }, | ||
{ color: 'yellow', textColor: 'black', label: 'Tile 6' }, | ||
{ color: 'gray', textColor: 'white', label: 'Tile 7' }, | ||
{ color: 'lime', textColor: 'black', label: 'Tile 8' }, | ||
{ color: 'pink', textColor: 'black', label: 'Tile 9' }, | ||
{ color: 'aquamarine', textColor: 'black', label: 'Tile 10' }, | ||
{ color: 'orange', textColor: 'black', label: 'Tile 11' }, | ||
{ color: 'indigo', textColor: 'white', label: 'Tile 12' }, | ||
] | ||
|
||
export const defaults = () => ( | ||
<ResponsiveTiles> | ||
{data.map(item => ( | ||
<div | ||
key={item.label} | ||
style={{ | ||
height: 150, | ||
backgroundColor: item.color, | ||
color: item.textColor, | ||
display: 'flex', | ||
fontFamily: 'Arial', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}} | ||
> | ||
{item.label} | ||
</div> | ||
))} | ||
</ResponsiveTiles> | ||
) |
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 React from 'react' | ||
|
||
import { withKnobs, boolean } from '@storybook/addon-knobs' | ||
import TabPanel from '../../src/TabPanel' | ||
|
||
export default { title: 'TabPanel', decorators: [withKnobs] } | ||
|
||
export const defaults = () => ( | ||
<TabPanel scrollable={boolean('Scrollable', true)}> | ||
<div label="First Tab">Contents of the first tab</div> | ||
<div label="Second Tab">Contents of the second tab</div> | ||
<div label="Third Tab">Contents of the third tab</div> | ||
<div label="Fourth Tab">Contents of the fourth tab</div> | ||
<div label="Fifth Tab">Contents of the fifth tab</div> | ||
</TabPanel> | ||
) |
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
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