import React from 'react';
import { storiesOf } from '@storybook/react';
import { checkA11y } from 'storybook-addon-a11y';
import ReportsTable from './index';
import reports from '../../mocks/reports';

storiesOf('ReportsTable')
  .addDecorator(checkA11y)
  .add('should render the recent reports', () => (
    <div
      style={{
        width: '920px',
      }}
    >
      <ReportsTable reports={reports} />
    </div>
  ))
  .add('should render recent reports for one report', () => (
    <div
      style={{
        width: '920px',
      }}
    >
      <ReportsTable reports={[reports[0]]} />
    </div>
  ))
  .add('should render a loading state', () => (
    <div
      style={{
        width: '920px',
      }}
    >
      <ReportsTable loading />
    </div>
  ))
  .add('should render an empty state for the table', () => (
    <div
      style={{
        width: '920px',
      }}
    >
      <ReportsTable />
    </div>
  ));
