forked from mui/material-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Stepper] Fix optional label is not centered when
alternativeLabel
…
…is used (mui#34335)
- Loading branch information
1 parent
b4ccae5
commit c03086d
Showing
2 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
test/regressions/fixtures/StepLabel/AlternativeLabelOptionalText.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
import Stepper from '@mui/material/Stepper'; | ||
import Step from '@mui/material/Step'; | ||
import StepLabel from '@mui/material/StepLabel'; | ||
|
||
const steps = ['Select master blaster campaign settings', 'Create an ad group', 'Create an ad']; | ||
|
||
export default function AlternativeLabelOptionalText() { | ||
return ( | ||
<Box sx={{ width: '100%' }}> | ||
<Stepper activeStep={1} alternativeLabel> | ||
{steps.map((label) => ( | ||
<Step key={label} expanded> | ||
<StepLabel optional="optional">{label}</StepLabel> | ||
</Step> | ||
))} | ||
</Stepper> | ||
</Box> | ||
); | ||
} |