// @flow
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { BackButton } from './index';
import { withDocs } from '../../../../.storybook/with-docs';
import docs from './BACK_BUTTON.mkd';

storiesOf('Core/Actions/BackButton', module)
  .add(
    'normal',
    withDocs(docs)(() => (
      <BackButton ariaLabel="Go Back" onClick={action('Clicked')} />
    )),
  )
  .add(
    'disabled',
    withDocs(docs)(() => (
      <BackButton ariaLabel="Go Back" onClick={action('Clicked')} disabled />
    )),
  );
