fix: add slider if stepper overflows

Signed-off-by: Federico Morreale <frc.morreale@gmail.com>
This commit is contained in:
Federico Morreale
2023-11-27 16:17:46 +01:00
parent 90ffed5382
commit 2aee53bbeb
3 changed files with 12 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-react': patch
---
Add horizontal slider if stepper overflows
@@ -190,7 +190,12 @@ export const Stepper = (stepperProps: StepperProps) => {
return (
<>
{isValidating && <LinearProgress variant="indeterminate" />}
<MuiStepper activeStep={activeStep} alternativeLabel variant="elevation">
<MuiStepper
activeStep={activeStep}
alternativeLabel
variant="elevation"
style={{ overflowX: 'auto' }}
>
{steps.map((step, index) => {
const isAllowedLabelClick = activeStep > index;
return (
@@ -58,6 +58,7 @@ export const TaskSteps = (props: TaskStepsProps) => {
activeStep={props.activeStep}
alternativeLabel
variant="elevation"
style={{ overflowX: 'auto' }}
>
{props.steps.map(step => {
const isCompleted = step.status === 'completed';