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
Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,6 +136,24 @@ copilot({
136
136
})(RootComponent)
137
137
```
138
138
139
+
### Custom step number component
140
+
You can customize the step number by passing a component to the `copilot` HOC maker. If you are looking for an example step number component, take a look at [the default step number implementation](https://github.com/okgrow/react-native-copilot/blob/master/src/components/StepNumber.js).
141
+
142
+
```js
143
+
constStepNumberComponent= ({
144
+
isFirstStep,
145
+
isLastStep,
146
+
currentStep,
147
+
currentStepNumber,
148
+
}) => (
149
+
// ...
150
+
);
151
+
152
+
copilot({
153
+
stepNumberComponent: StepNumberComponent
154
+
})(RootComponent)
155
+
```
156
+
139
157
### Custom components as steps
140
158
The components wrapped inside `CopilotStep`, will receive a `copilot` prop of type `Object` which the outermost rendered element of the component or the element that you want the tooltip be shown around, must extend.
0 commit comments