Skip to content

PreviousButton

Description

StepsLayout.PreviousButton connects to the StepsContext to move the user to the previous step when clicked.

Demo

<StepsContext.Provider
value={{
activeIndex: 5,
handlePrevious: () => console.log('handlePrevious'),
handleNext: () => null,
}}
>
<StepsLayout.PreviousButton />
</StepsContext.Provider>

Properties

PropertyTypeDescription
childrenReact.Node(required) Button text.
data-testidstring(required) Test ID.