Closed rahulgit closed 4 years ago
@rahulgit when using Step
's render prop, you have access to the router functions. From there, you can use push
:
<Steps>
<Step id="gandalf" render={({ push }) => (
<>
<h1 className="text-align-center">Gandalf</h1>
<button className="btn-fluid margin-1-b" onClick={() => push('dumbledore')} >Go to Dumbledore</button>
</>
) />
//Other steps, including 'dumbledore'
</Steps>
You also have access to the push
router function from the WithWizard
component.
<WithWizard
render={({ push }) => ...
See https://github.com/americanexpress/react-albus#contextwizard for more info on what you can use from the wizard context.
Is there any option to Switch to a specific step from on click `
Gandalf