// @flow
import React from 'react';
import { action } from '@storybook/addon-actions';
import { withInfo } from '@storybook/addon-info';
import { storiesOf } from '@storybook/react';
import { configDocs } from '../../../../.storybook/config-docs';
import { Button } from '.';
import docs from './BUTTON.mkd';

storiesOf('Core/Actions/Button/primary', module)
  .addDecorator(withInfo(configDocs(docs, Button)))
  .add('sm', () => (
    <Button size="sm" onClick={action('clicked')}>
      Click me
    </Button>
  ))
  .add('md', () => (
    <Button onClick={action('clicked')} size="md">
      Click me
    </Button>
  ))
  .add('disabled', () => (
    <Button href="https://google.com" size="md" disabled>
      Go to Google
    </Button>
  ))
  .add('as link', () => (
    <Button href="https://google.com" size="md">
      Go to Google
    </Button>
  ));
