fix: add slider if stepper overflows
Signed-off-by: Federico Morreale <frc.morreale@gmail.com>
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user