Skip to content

Instantly share code, notes, and snippets.

@MicroBenz
Created March 26, 2018 11:10
Show Gist options
  • Save MicroBenz/332278e4bf9b1ac5d3fb1eb6c3d92efe to your computer and use it in GitHub Desktop.
Save MicroBenz/332278e4bf9b1ac5d3fb1eb6c3d92efe to your computer and use it in GitHub Desktop.
Storybook
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';
import { Button, Welcome } from '@storybook/react/demo';
storiesOf('Welcome', module).add('to Storybook', () => <Welcome showApp={linkTo('Button')} />);
storiesOf('Button', module)
.add('with text', () => <Button onClick={action('clicked')}>Hello Button</Button>)
.add('with some emoji', () => <Button onClick={action('clicked')}>😀 😎 👍 💯</Button>);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment