You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Steps` component accepts an optional `config` object for configuring the common navigation component. The `Navigation` component provided in the config object will be rendered along with every step component. Here is an example:
45
+
`Steps` component accepts an optional `config` object for configuring the common navigation component or components that you'd like render before or after the Step components. These components are rendered along with every step component. Here is an example:
return<span>This component will be rendered before the Step components in every step</span>
59
+
}
60
+
61
+
constAfter= (props) => {
62
+
return<span>This component will be rendered after the Step components in every step</span>
63
+
}
64
+
57
65
constconfig= {
66
+
before: Before, // a React component with special props provided automatically
67
+
after: After, // a React component with special props provided automatically
58
68
navigation: {
59
69
component: Navigation, // a React component with special props provided automatically
60
70
location:"before"// or after
@@ -127,6 +137,14 @@ The React component that is passed to each `Step` wrapper component will be inje
127
137
128
138
## Config Object
129
139
140
+
### `before`
141
+
142
+
It accepts a function that returns some JSX.Element. This component's `props` object is automatically populated with the `Steps` component's state (see: [NavigationComponentProps](#component-type-of-example-navigation-component)).
143
+
144
+
### `after`
145
+
146
+
It accepts a function that returns some JSX.Element. This component's `props` object is automatically populated with the `Steps` component's state (see: [NavigationComponentProps](#component-type-of-example-navigation-component)).
## Example Navigation, Before, and After Components
174
192
175
-
If you'd like to add a persistent navigation component to be shown on every step, you may utilize `NavigationComponentProps` type for your custom `Navigation` component. Here is an example:
193
+
If you'd like to add a persistent components to be shown on before or after every step, you may utilize `NavigationComponentProps` type for your custom `Navigation`, `Before`, or `After` components. Here is an example:
0 commit comments