diff --git a/.changeset/hot-wolves-flash.md b/.changeset/hot-wolves-flash.md new file mode 100644 index 0000000000..84c4d34f37 --- /dev/null +++ b/.changeset/hot-wolves-flash.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-react': patch +--- + +Step titles in the Stepper are now clickable and redirect the user to the corresponding step, as an alternative to using the back buttons. diff --git a/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx b/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx index 9a333944b9..ccb97829dc 100644 --- a/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx +++ b/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx @@ -191,11 +191,21 @@ export const Stepper = (stepperProps: StepperProps) => { <> {isValidating && } - {steps.map((step, index) => ( - - {step.title} - - ))} + {steps.map((step, index) => { + const isAllowedTitleClick = activeStep > index; + return ( + + { + if (isAllowedTitleClick) setActiveStep(index); + }} + > + {step.title} + + + ); + })} Review