import React, { FunctionComponent } from 'react';

import { TableCell } from './cell';
import { TableRow } from './row';
import { TableCellProps, TableRowProps } from '../types.d';

const Body: FunctionComponent<{ children: React.ReactNode }> = ({ children }) => {
  return <div className="square-table-body">{children}</div>;
};

export const TableBody = Object.assign(Body, {
  TR: TableRow as unknown as React.FC<TableRowProps>,
  TD: TableCell as unknown as React.FC<TableCellProps>,
});
