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

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