// @flow
import PropTypes from 'prop-types';
import type { Element } from 'react';
import { Th } from './th';
import { Tr } from './tr';

export type StyledResponsiveTableProps = {
  thWidth: number,
  className: string,
};

export type TableProps = {
  thWidth: number,
  headers: Element<typeof Th>[],
  rows: Element<typeof Tr>[],
  className?: string,
};

export const tablePropTypes = {
  thWidth: PropTypes.number,
  headers: PropTypes.arrayOf(PropTypes.element).isRequired,
  rows: PropTypes.arrayOf(PropTypes.element).isRequired,
};
