Part of the project
Coming from Update the VBBA setup flow to new design system design doc.
Implement useSubStep of the design doc to:
This hook will be used for the main component step to keep track of the current sub-steps.
Feature Description
At initialization, you pass the list of sub-steps to show, where to start and a callback to know when reaches the last step.
Will return an array with the next item:
- function
nextStep, which should check if can move forward or if it was in edit mode go to the last screen (in general will be the confirmation step)
- function
moveAndEdit, which will take you to a specific step in edit mode
- the component to render
- the
isEditMode to enable the edition on that step