score:0

try this:

import react from 'react';
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';
import paper from '@material-ui/core/paper';


 const usestyles = makestyles(theme => ({
      root: {
        fontsize: '200pt',
      },
      table: {
        fontsize: '200pt',
      },
    }));


function createdata(name, calories, fat, carbs, protein) {
  return { name, calories, fat, carbs, protein };
}

const rows = [
  createdata('frozen yoghurt', 159, 6.0, 24, 4.0),
  createdata('ice cream sandwich', 237, 9.0, 37, 4.3),
  createdata('eclair', 262, 16.0, 24, 6.0),
  createdata('cupcake', 305, 3.7, 67, 4.3),
  createdata('gingerbread', 356, 16.0, 49, 3.9),
];

add the body class to table tag not in tablecell

  export default function simpletable() {
  const classes = usestyles();

  return (
    <paper classname={classes.root}>
      <table classname={classes.table}>
        <tablehead>
          <tablerow>
            <tablecell>dessert (100g serving)</tablecell>
            <tablecell align="right">calories</tablecell>
            <tablecell align="right">fat&nbsp;(g)</tablecell>
            <tablecell align="right">carbs&nbsp;(g)</tablecell>
            <tablecell align="right">protein&nbsp;(g)</tablecell>
          </tablerow>
        </tablehead>
        <tablebody>
          {rows.map(row => (
            <tablerow key={row.name}>
              <tablecell component="th" scope="row">
                {row.name}
              </tablecell>
              <tablecell align="right">{row.calories}</tablecell>
              <tablecell align="right">{row.fat}</tablecell>
              <tablecell align="right">{row.carbs}</tablecell>
              <tablecell align="right">{row.protein}</tablecell>
            </tablerow>
          ))}
        </tablebody>
      </table>
    </paper>
  );
}

Related Query

More Query from same tag