() => {
const [currentStep, setCurrentStep] = useState(1)
const total = 5;
return (
<>
<Stepper steps={total} current={currentStep} />
<Button className="mt-md mb-md mr-xs" onClick={() => setCurrentStep(currentStep <= 1 ? 1 : currentStep - 1)}>
Voltar
</Button>
<Button className="mt-md mb-md" onClick={() => setCurrentStep(currentStep >= total ? currentStep : currentStep + 1)}>
Avançar
</Button>
<pre>
<code>Current step: {currentStep}</code>
</pre>
</>
)
}