diff --git a/src/pages/ValidatorOnboarding/FormStepper.tsx b/src/pages/ValidatorOnboarding/FormStepper.tsx index 294f0fc4..b4e0bef1 100644 --- a/src/pages/ValidatorOnboarding/FormStepper.tsx +++ b/src/pages/ValidatorOnboarding/FormStepper.tsx @@ -1,10 +1,12 @@ -import { useState } from 'react' import { Stepper, Step } from 'react-form-stepper' import './FormStepper.css' -const FormStepper = () => { - const [activeStep, setActiveStep] = useState(0) +type FormStepperProps = { + activeStep: number + changeActiveStep: (step: number) => void +} +const FormStepper = ({ activeStep, changeActiveStep }: FormStepperProps) => { return ( { setActiveStep(0)} + onClick={() => changeActiveStep(0)} completed={activeStep >= 0} /> setActiveStep(1)} + onClick={() => changeActiveStep(1)} completed={activeStep > 0} /> setActiveStep(2)} + onClick={() => changeActiveStep(2)} completed={activeStep > 1} /> setActiveStep(3)} + onClick={() => changeActiveStep(3)} completed={activeStep > 2} /> setActiveStep(4)} + onClick={() => changeActiveStep(4)} completed={activeStep > 3} />