Skip to content

Instantly share code, notes, and snippets.

@Natanagar
Created October 1, 2019 22:01
Show Gist options
  • Save Natanagar/80d64158f98af33d40dd6616b18edeb9 to your computer and use it in GitHub Desktop.
Save Natanagar/80d64158f98af33d40dd6616b18edeb9 to your computer and use it in GitHub Desktop.
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