diff --git a/packages/mui-material/src/CardHeader/CardHeader.js b/packages/mui-material/src/CardHeader/CardHeader.js index 579117c64bafc8..80471366956899 100644 --- a/packages/mui-material/src/CardHeader/CardHeader.js +++ b/packages/mui-material/src/CardHeader/CardHeader.js @@ -3,7 +3,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import composeClasses from '@mui/utils/composeClasses'; -import Typography from '../Typography'; +import Typography, { typographyClasses } from '../Typography'; import { styled } from '../zero-styled'; import { useDefaultProps } from '../DefaultPropsProvider'; import cardHeaderClasses, { getCardHeaderUtilityClass } from './cardHeaderClasses'; @@ -65,6 +65,12 @@ const CardHeaderContent = styled('div', { overridesResolver: (props, styles) => styles.content, })({ flex: '1 1 auto', + [`.${typographyClasses.root}:where(& .${cardHeaderClasses.title})`]: { + display: 'block', + }, + [`.${typographyClasses.root}:where(& .${cardHeaderClasses.subheader})`]: { + display: 'block', + }, }); const CardHeader = React.forwardRef(function CardHeader(inProps, ref) { @@ -97,7 +103,6 @@ const CardHeader = React.forwardRef(function CardHeader(inProps, ref) { variant={avatar ? 'body2' : 'h5'} className={classes.title} component="span" - display="block" {...titleTypographyProps} > {title} @@ -113,7 +118,6 @@ const CardHeader = React.forwardRef(function CardHeader(inProps, ref) { className={classes.subheader} color="textSecondary" component="span" - display="block" {...subheaderTypographyProps} > {subheader} diff --git a/packages/mui-material/src/FormControlLabel/FormControlLabel.js b/packages/mui-material/src/FormControlLabel/FormControlLabel.js index a277055f179a5c..9801c7aef896fb 100644 --- a/packages/mui-material/src/FormControlLabel/FormControlLabel.js +++ b/packages/mui-material/src/FormControlLabel/FormControlLabel.js @@ -7,7 +7,6 @@ import composeClasses from '@mui/utils/composeClasses'; import { useFormControl } from '../FormControl'; import { styled } from '../zero-styled'; import { useDefaultProps } from '../DefaultPropsProvider'; -import Stack from '../Stack'; import Typography from '../Typography'; import capitalize from '../utils/capitalize'; import formControlLabelClasses, { @@ -195,12 +194,12 @@ const FormControlLabel = React.forwardRef(function FormControlLabel(inProps, ref > {React.cloneElement(control, controlProps)} {required ? ( - +
{label}  {'*'} - +
) : ( label )} diff --git a/packages/mui-material/src/ListItemText/ListItemText.js b/packages/mui-material/src/ListItemText/ListItemText.js index 51379b3d523836..08358c5877ad8e 100644 --- a/packages/mui-material/src/ListItemText/ListItemText.js +++ b/packages/mui-material/src/ListItemText/ListItemText.js @@ -3,7 +3,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import composeClasses from '@mui/utils/composeClasses'; -import Typography from '../Typography'; +import Typography, { typographyClasses } from '../Typography'; import ListContext from '../List/ListContext'; import { styled } from '../zero-styled'; import { useDefaultProps } from '../DefaultPropsProvider'; @@ -41,6 +41,12 @@ const ListItemTextRoot = styled('div', { minWidth: 0, marginTop: 4, marginBottom: 4, + [`.${typographyClasses.root}:where(& .${listItemTextClasses.primary})`]: { + display: 'block', + }, + [`.${typographyClasses.root}:where(& .${listItemTextClasses.secondary})`]: { + display: 'block', + }, variants: [ { props: ({ ownerState }) => ownerState.primary && ownerState.secondary, @@ -93,7 +99,6 @@ const ListItemText = React.forwardRef(function ListItemText(inProps, ref) { variant={dense ? 'body2' : 'body1'} className={classes.primary} component={primaryTypographyProps?.variant ? undefined : 'span'} - display="block" {...primaryTypographyProps} > {primary} @@ -107,7 +112,6 @@ const ListItemText = React.forwardRef(function ListItemText(inProps, ref) { variant="body2" className={classes.secondary} color="textSecondary" - display="block" {...secondaryTypographyProps} > {secondary}