Skip to content

Commit

Permalink
align optionalLabel to the center
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeshanTamboli committed Sep 16, 2022
1 parent 2abb8f9 commit 57fd573
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/mui-material/src/StepLabel/StepLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const useUtilityClasses = (ownerState) => {
disabled && 'disabled',
alternativeLabel && 'alternativeLabel',
],
labelContainer: ['labelContainer'],
labelContainer: ['labelContainer', alternativeLabel && 'alternativeLabel'],
};

return composeClasses(slots, getStepLabelUtilityClass, classes);
Expand Down Expand Up @@ -84,7 +84,6 @@ const StepLabelLabel = styled('span', {
fontWeight: 500,
},
[`&.${stepLabelClasses.alternativeLabel}`]: {
textAlign: 'center',
marginTop: 16,
},
[`&.${stepLabelClasses.error}`]: {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 57fd573

Please sign in to comment.