Skip to content

Instantly share code, notes, and snippets.

@viniciusdacal
Created November 1, 2017 15:56
Show Gist options
  • Save viniciusdacal/1926cb92061a92b7d87d6499b5701664 to your computer and use it in GitHub Desktop.
Save viniciusdacal/1926cb92061a92b7d87d6499b5701664 to your computer and use it in GitHub Desktop.
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