Skip to content

Commit

Permalink
[material-ui][docs] Add minor modifications to the Vertical stepper d…
Browse files Browse the repository at this point in the history
…emo (mui#42342)
  • Loading branch information
mihilt authored May 22, 2024
1 parent 9c62cf0 commit 4771db0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 34 deletions.
32 changes: 15 additions & 17 deletions docs/data/material/components/steppers/VerticalLinearStepper.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function VerticalLinearStepper() {
<Step key={step.label}>
<StepLabel
optional={
index === 2 ? (
index === steps.length - 1 ? (
<Typography variant="caption">Last step</Typography>
) : null
}
Expand All @@ -61,22 +61,20 @@ export default function VerticalLinearStepper() {
<StepContent>
<Typography>{step.description}</Typography>
<Box sx={{ mb: 2 }}>
<div>
<Button
variant="contained"
onClick={handleNext}
sx={{ mt: 1, mr: 1 }}
>
{index === steps.length - 1 ? 'Finish' : 'Continue'}
</Button>
<Button
disabled={index === 0}
onClick={handleBack}
sx={{ mt: 1, mr: 1 }}
>
Back
</Button>
</div>
<Button
variant="contained"
onClick={handleNext}
sx={{ mt: 1, mr: 1 }}
>
{index === steps.length - 1 ? 'Finish' : 'Continue'}
</Button>
<Button
disabled={index === 0}
onClick={handleBack}
sx={{ mt: 1, mr: 1 }}
>
Back
</Button>
</Box>
</StepContent>
</Step>
Expand Down
32 changes: 15 additions & 17 deletions docs/data/material/components/steppers/VerticalLinearStepper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function VerticalLinearStepper() {
<Step key={step.label}>
<StepLabel
optional={
index === 2 ? (
index === steps.length - 1 ? (
<Typography variant="caption">Last step</Typography>
) : null
}
Expand All @@ -61,22 +61,20 @@ export default function VerticalLinearStepper() {
<StepContent>
<Typography>{step.description}</Typography>
<Box sx={{ mb: 2 }}>
<div>
<Button
variant="contained"
onClick={handleNext}
sx={{ mt: 1, mr: 1 }}
>
{index === steps.length - 1 ? 'Finish' : 'Continue'}
</Button>
<Button
disabled={index === 0}
onClick={handleBack}
sx={{ mt: 1, mr: 1 }}
>
Back
</Button>
</div>
<Button
variant="contained"
onClick={handleNext}
sx={{ mt: 1, mr: 1 }}
>
{index === steps.length - 1 ? 'Finish' : 'Continue'}
</Button>
<Button
disabled={index === 0}
onClick={handleBack}
sx={{ mt: 1, mr: 1 }}
>
Back
</Button>
</Box>
</StepContent>
</Step>
Expand Down

0 comments on commit 4771db0

Please sign in to comment.