// @flow
import React from 'react';
import { action } from '@storybook/addon-actions';
import { BackButton } from './back-button.component';
import type { BackButtonProps } from './back-button.proptypes';
import docs from './back-button.mdx';

export default {
  component: BackButton,
  title: 'Wizard Buttons/Back Button',
  parameters: {
    fileName: __filename,
    docs: {
      page: docs,
    },
  },
};

const DEFAULT_PROPS: BackButtonProps = {
  ariaLabel: 'Go Back',
  onClick: action('Clicked'),
};

export const Normal = () => <BackButton {...DEFAULT_PROPS} />;
export const Disabled = () => <BackButton {...DEFAULT_PROPS} disabled />;
