diff --git a/packages/mui-material/src/StepLabel/StepLabel.js b/packages/mui-material/src/StepLabel/StepLabel.js index e4d0df4d51f3c1..d3684e35dd2c6b 100644 --- a/packages/mui-material/src/StepLabel/StepLabel.js +++ b/packages/mui-material/src/StepLabel/StepLabel.js @@ -36,7 +36,7 @@ const useUtilityClasses = (ownerState) => { disabled && 'disabled', alternativeLabel && 'alternativeLabel', ], - labelContainer: ['labelContainer'], + labelContainer: ['labelContainer', alternativeLabel && 'alternativeLabel'], }; return composeClasses(slots, getStepLabelUtilityClass, classes); @@ -84,7 +84,6 @@ const StepLabelLabel = styled('span', { fontWeight: 500, }, [`&.${stepLabelClasses.alternativeLabel}`]: { - textAlign: 'center', marginTop: 16, }, [`&.${stepLabelClasses.error}`]: { @@ -112,6 +111,9 @@ const StepLabelLabelContainer = styled('span', { })(({ theme }) => ({ width: '100%', color: (theme.vars || theme).palette.text.secondary, + [`&.${stepLabelClasses.alternativeLabel}`]: { + textAlign: 'center', + }, })); const StepLabel = React.forwardRef(function StepLabel(inProps, ref) {