text: // @material-ui/core components
  import { makeStyles } from '@material-ui/core/styles';
  import Table from '@material-ui/core/Table';
  import TableBody from '@material-ui/core/TableBody';
  import TableCell from '@material-ui/core/TableCell';
  import TableHead from '@material-ui/core/TableHead';
  import TableRow from '@material-ui/core/TableRow';
  // core components
  import styles from 'assets/jss/material-dashboard-react/components/tableStyle.js';
  import PropTypes from 'prop-types';
  import React from 'react';
  
  const useStyles = makeStyles(styles);
  
  export default function CustomTable(props) {
    const classes = useStyles();
    const { tableHead, tableHeaderColor, children } = props;
    return (
      <div className={classes.tableResponsive}>
        <Table className={classes.table}>
          {tableHead !== undefined ? (
            <TableHead className={classes[tableHeaderColor + 'TableHeader']}>
              <TableRow className={classes.tableHeadRow}>
                {tableHead.map((prop, key) => {
                  if(key === tableHead.length -1) 
                  return  (
                    <TableCell align="right" className={classes.tableCell + ' ' + classes.tableHeadCell} key={key}>
                      {prop}
                    </TableCell>
                  );
                else
                  return (
                    <TableCell className={classes.tableCell + ' ' + classes.tableHeadCell} key={key}>
                      {prop}
                    </TableCell>
                  );
                })}
              </TableRow>
            </TableHead>
          ) : null}
  
          <TableBody>{children}</TableBody>
        </Table>
      </div>
    );
  }
  
  CustomTable.defaultProps = {
    tableHeaderColor: 'gray',
  };
  
  CustomTable.propTypes = {
    tableHeaderColor: PropTypes.oneOf([
      'warning',
      'primary',
      'danger',
      'success',
      'info',
      'rose',
      'gray',
    ]),
    tableHead: PropTypes.arrayOf(PropTypes.string),
    tableData: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.string)),
    children: PropTypes.element,
  };
  