Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. import React from 'react';
  2. import { storiesOf } from '@storybook/react';
  3. import { withKnobs, boolean, text, select } from '@storybook/addon-knobs';
  4.  
  5. import { Center } from '../Center/Center';
  6. import Label from './Label';
  7. const stories = storiesOf('Label', module);
  8. stories.addDecorator((story) => <Center>{story()}</Center>);
  9. stories.addDecorator(withKnobs);
  10. stories.add('Default Color', () => {
  11. const backgroundColor = text('Background Color', 'rgba(1,113,211,0.05)');
  12. const opacity = text('opacity level', '1');
  13. const size = text('content', 'Label');
  14. const color = select(
  15. 'color',
  16. { Default: 'rgba(1,113,211,0.05)', Dark: 'darkred' },
  17. 'default'
  18. );
  19. const props = {
  20. color,
  21. text,
  22. backgroundColor,
  23. opacity,
  24. size,
  25. };
  26. return <Label.BaseLabel {...props} />, { notes: 'Default color' };
  27. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement