diff --git a/docs/src/pages/demos/tables/EnhancedTable.js b/docs/src/pages/demos/tables/EnhancedTable.js index 68bcb269a6e372..e96c03f5342e81 100644 --- a/docs/src/pages/demos/tables/EnhancedTable.js +++ b/docs/src/pages/demos/tables/EnhancedTable.js @@ -108,7 +108,6 @@ RawEnhancedTableHead.propTypes = { onSelectAllClick: PropTypes.func.isRequired, order: PropTypes.string.isRequired, orderBy: PropTypes.string.isRequired, - padding: PropTypes.oneOf(['normal', 'none', 'checkbox']), rowCount: PropTypes.number.isRequired, }; diff --git a/docs/src/pages/demos/tables/ReactVirtualizedTable.js b/docs/src/pages/demos/tables/ReactVirtualizedTable.js index 20648dabab9522..1dbe936dfca49e 100644 --- a/docs/src/pages/demos/tables/ReactVirtualizedTable.js +++ b/docs/src/pages/demos/tables/ReactVirtualizedTable.js @@ -10,9 +10,6 @@ import Paper from '@material-ui/core/Paper'; import { AutoSizer, Column, SortDirection, Table } from 'react-virtualized'; const styles = theme => ({ - table: { - fontFamily: theme.typography.fontFamily, - }, flexContainer: { display: 'flex', alignItems: 'center', @@ -95,7 +92,6 @@ class MuiVirtualizedTable extends React.PureComponent { {({ height, width }) => ( - rows[index]} onRowClick={event => console.log(event)} diff --git a/packages/material-ui/src/Table/Table.js b/packages/material-ui/src/Table/Table.js index d4c20f89056df7..887f584d821ee1 100644 --- a/packages/material-ui/src/Table/Table.js +++ b/packages/material-ui/src/Table/Table.js @@ -4,7 +4,7 @@ import clsx from 'clsx'; import withStyles from '../styles/withStyles'; import TableContext from './TableContext'; -export const styles = theme => ({ +export const styles = { /* Styles applied to the root element. */ root: { display: 'table', @@ -12,7 +12,7 @@ export const styles = theme => ({ borderCollapse: 'collapse', borderSpacing: 0, }, -}); +}; function Table(props) { const { classes, className, component: Component, padding, size, ...other } = props; diff --git a/packages/material-ui/src/Table/Table.test.js b/packages/material-ui/src/Table/Table.test.js index b5dfb0b58a7b6f..8f9fd3297aa1ff 100644 --- a/packages/material-ui/src/Table/Table.test.js +++ b/packages/material-ui/src/Table/Table.test.js @@ -64,7 +64,6 @@ describe('
', () => { {value => { context = value; - return ; }} @@ -72,6 +71,7 @@ describe('
', () => { ); assert.deepStrictEqual(context, { + size: 'normal', padding: 'normal', }); }); diff --git a/packages/material-ui/src/TableCell/TableCell.js b/packages/material-ui/src/TableCell/TableCell.js index 507c50e64b1a4c..fffe0dcffdb29c 100644 --- a/packages/material-ui/src/TableCell/TableCell.js +++ b/packages/material-ui/src/TableCell/TableCell.js @@ -52,7 +52,6 @@ export const styles = theme => ({ '&:last-child': { paddingRight: 16, }, - '&$paddingCheckbox': { width: 24, // prevent the checkbox column from growing padding: '0px 12px 0 16px', diff --git a/packages/material-ui/src/TableCell/TableCell.test.js b/packages/material-ui/src/TableCell/TableCell.test.js index 424d9907897413..f8338177a29e53 100644 --- a/packages/material-ui/src/TableCell/TableCell.test.js +++ b/packages/material-ui/src/TableCell/TableCell.test.js @@ -64,11 +64,11 @@ describe('', () => { assert.strictEqual(wrapper.find('td').hasClass(classes.paddingCheckbox), true); }); - it('should render with the user, root, padding, and dense classes', () => { - const wrapper = mountInTable(); + it('should render with the user, root, padding, and small classes', () => { + const wrapper = mountInTable(); assert.strictEqual(wrapper.find('td').hasClass('woofTableCell'), true); assert.strictEqual(wrapper.find('td').hasClass(classes.root), true); - assert.strictEqual(wrapper.find('td').hasClass(classes.paddingDense), true); + assert.strictEqual(wrapper.find('td').hasClass(classes.sizeSmall), true); }); it('should render children', () => {