From cd35b803c71abb4ffa4f095c30b959b6a5e07e20 Mon Sep 17 00:00:00 2001 From: jsus Date: Thu, 16 Apr 2020 16:24:21 +0300 Subject: [PATCH 1/2] [ExpansionPanel] Paddings use theme.spacing(2) --- .../src/ExpansionPanelDetails/ExpansionPanelDetails.js | 7 ++++--- .../src/ExpansionPanelSummary/ExpansionPanelSummary.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/material-ui/src/ExpansionPanelDetails/ExpansionPanelDetails.js b/packages/material-ui/src/ExpansionPanelDetails/ExpansionPanelDetails.js index 5d13dd37a19a84..4d5920709dd765 100644 --- a/packages/material-ui/src/ExpansionPanelDetails/ExpansionPanelDetails.js +++ b/packages/material-ui/src/ExpansionPanelDetails/ExpansionPanelDetails.js @@ -3,13 +3,14 @@ import PropTypes from 'prop-types'; import clsx from 'clsx'; import withStyles from '../styles/withStyles'; -export const styles = { +export const styles = (theme) => ({ /* Styles applied to the root element. */ root: { display: 'flex', - padding: '8px 24px 24px', + padding: theme.spacing(2), + paddingTop: theme.spacing(1), }, -}; +}); const ExpansionPanelDetails = React.forwardRef(function ExpansionPanelDetails(props, ref) { const { classes, className, ...other } = props; diff --git a/packages/material-ui/src/ExpansionPanelSummary/ExpansionPanelSummary.js b/packages/material-ui/src/ExpansionPanelSummary/ExpansionPanelSummary.js index 7ed48db1ad40bf..b612814034e2ff 100644 --- a/packages/material-ui/src/ExpansionPanelSummary/ExpansionPanelSummary.js +++ b/packages/material-ui/src/ExpansionPanelSummary/ExpansionPanelSummary.js @@ -17,7 +17,7 @@ export const styles = (theme) => { display: 'flex', minHeight: 8 * 6, transition: theme.transitions.create(['min-height', 'background-color'], transition), - padding: theme.spacing(0, 3), + padding: theme.spacing(0, 2), '&:hover:not($disabled)': { cursor: 'pointer', }, From b5ee5e6f4b671401e7b1f6c0ae7fde8e3c92c1e7 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Thu, 16 Apr 2020 16:18:38 +0200 Subject: [PATCH 2/2] Update ExpansionPanelDetails.js --- .../src/ExpansionPanelDetails/ExpansionPanelDetails.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/material-ui/src/ExpansionPanelDetails/ExpansionPanelDetails.js b/packages/material-ui/src/ExpansionPanelDetails/ExpansionPanelDetails.js index 4d5920709dd765..831d506e6c2bf8 100644 --- a/packages/material-ui/src/ExpansionPanelDetails/ExpansionPanelDetails.js +++ b/packages/material-ui/src/ExpansionPanelDetails/ExpansionPanelDetails.js @@ -7,8 +7,7 @@ export const styles = (theme) => ({ /* Styles applied to the root element. */ root: { display: 'flex', - padding: theme.spacing(2), - paddingTop: theme.spacing(1), + padding: theme.spacing(1, 2, 2), }, });