Skip to content

Commit

Permalink
a second try
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Dec 18, 2018
1 parent efc15ce commit c8c7546
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
6 changes: 1 addition & 5 deletions docs/src/pages/demos/buttons/CustomizedButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ import purple from '@material-ui/core/colors/purple';
import green from '@material-ui/core/colors/green';

const styles = theme => ({
container: {
display: 'flex',
flexWrap: 'wrap',
},
margin: {
margin: theme.spacing.unit,
},
Expand Down Expand Up @@ -69,7 +65,7 @@ function CustomizedInputs(props) {
const { classes } = props;

return (
<div className={classes.container}>
<div>
<Button
variant="contained"
color="primary"
Expand Down
7 changes: 4 additions & 3 deletions packages/material-ui/src/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { capitalize } from '../utils/helpers';
export const styles = theme => ({
/* Styles applied to the root element. */
root: {
lineHeight: 1.3125, // To remove with v4.
...theme.typography.button,
boxSizing: 'border-box',
minWidth: 64,
Expand Down Expand Up @@ -207,16 +208,16 @@ export const styles = theme => ({
},
/* Styles applied to the root element if `size="small"`. */
sizeSmall: {
padding: '7px 8px',
padding: '6px 8px',
minWidth: 64,
minHeight: 32,
minHeight: 31,
fontSize: theme.typography.pxToRem(13),
},
/* Styles applied to the root element if `size="large"`. */
sizeLarge: {
padding: '8px 24px',
minWidth: 112,
minHeight: 40,
minHeight: 41,
fontSize: theme.typography.pxToRem(15),
},
/* Styles applied to the root element if `fullWidth={true}`. */
Expand Down
10 changes: 7 additions & 3 deletions packages/material-ui/src/ListItemText/ListItemText.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function ListItemText(props) {
primaryTypographyProps,
secondary: secondaryProp,
secondaryTypographyProps,
theme,
...other
} = props;

Expand All @@ -62,8 +63,7 @@ function ListItemText(props) {
if (primary != null && primary.type !== Typography && !disableTypography) {
primary = (
<Typography
variant="subheading"
internalDeprecatedVariant
variant={theme.typography.useNextVariants ? 'body1' : 'subheading'}
className={classNames(classes.primary, { [classes.textDense]: dense })}
component="span"
{...primaryTypographyProps}
Expand Down Expand Up @@ -153,11 +153,15 @@ ListItemText.propTypes = {
* (as long as disableTypography is not `true`).
*/
secondaryTypographyProps: PropTypes.object,
/**
* @ignore
*/
theme: PropTypes.object.isRequired,
};

ListItemText.defaultProps = {
disableTypography: false,
inset: false,
};

export default withStyles(styles, { name: 'MuiListItemText' })(ListItemText);
export default withStyles(styles, { name: 'MuiListItemText', withTheme: true })(ListItemText);
2 changes: 1 addition & 1 deletion packages/material-ui/src/styles/createTypography.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function createTypography(palette, typography) {
subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),
body1Next: buildVariant(fontWeightRegular, 16, 1.5, 0.15),
body2Next: buildVariant(fontWeightRegular, 14, 1.5, 0.15),
buttonNext: buildVariant(fontWeightMedium, 14, 1.5, 0.4, caseAllCaps),
buttonNext: buildVariant(fontWeightMedium, 14, 1.3125, 0.4, caseAllCaps),
captionNext: buildVariant(fontWeightRegular, 12, 1.66, 0.4),
overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),
};
Expand Down

0 comments on commit c8c7546

Please sign in to comment.