Created
October 1, 2019 22:01
-
-
Save Natanagar/80d64158f98af33d40dd6616b18edeb9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import React from 'react'; | |
import { storiesOf } from '@storybook/react'; | |
import { withKnobs, boolean, text, select } from '@storybook/addon-knobs'; | |
import { Center } from '../Center/Center'; | |
import Label from './Label'; | |
const stories = storiesOf('Label', module); | |
stories.addDecorator((story) => <Center>{story()}</Center>); | |
stories.addDecorator(withKnobs); | |
stories.add('Default Color', () => { | |
const backgroundColor = text('Background Color', 'rgba(1,113,211,0.05)'); | |
const opacity = text('opacity level', '1'); | |
const size = text('content', 'Label'); | |
const color = select( | |
'color', | |
{ Default: 'rgba(1,113,211,0.05)', Dark: 'darkred' }, | |
'default' | |
); | |
const props = { | |
color, | |
text, | |
backgroundColor, | |
opacity, | |
size, | |
}; | |
return <Label.BaseLabel {...props} />, { notes: 'Default color' }; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment