Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CardContent] Use theme.spacing() instead of hardcoded values #32471

Open
wants to merge 8 commits into
base: v5.x
Choose a base branch
from
4 changes: 2 additions & 2 deletions packages/mui-material/src/CardContent/CardContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const CardContentRoot = styled('div', {
overridesResolver: (props, styles) => styles.root,
})(() => {
mnajdova marked this conversation as resolved.
Show resolved Hide resolved
return {
padding: 16,
padding: styled.theme.spacing(2),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TypeError: Cannot read property 'spacing' of undefined

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be

})(({ theme }) => {
  return {
    padding: theme.spacing(2),

mnajdova marked this conversation as resolved.
Show resolved Hide resolved
'&:last-child': {
paddingBottom: 24,
paddingBottom: styled.theme.spacing(3),
mnajdova marked this conversation as resolved.
Show resolved Hide resolved
},
};
});
Expand Down
4 changes: 2 additions & 2 deletions packages/mui-material/src/InputLabel/InputLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ const InputLabelRoot = styled(FormLabel, {
...(ownerState.shrink && {
userSelect: 'none',
pointerEvents: 'auto',
maxWidth: 'calc(133% - 24px)',
transform: 'translate(14px, -9px) scale(0.75)',
maxWidth: 'calc(150% - 24px)',
transform: 'translate(12px, -9px) scale(0.70)',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? Let's not change this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZeeshanTamboli sorry this changes were related to another pull request

mnajdova marked this conversation as resolved.
Show resolved Hide resolved
}),
}),
}));
Expand Down