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
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,7 +114,7 @@ You can specify the overlay when applying the `copilot` HOC:
114
114
```js
115
115
copilot({
116
116
overlay:'svg', // or 'view'
117
-
animated true, // or false
117
+
animated:true, // or false
118
118
})(RootComponent);
119
119
```
120
120
@@ -138,6 +138,24 @@ copilot({
138
138
})(RootComponent)
139
139
```
140
140
141
+
### Custom step number component
142
+
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).
143
+
144
+
```js
145
+
constStepNumberComponent= ({
146
+
isFirstStep,
147
+
isLastStep,
148
+
currentStep,
149
+
currentStepNumber,
150
+
}) => (
151
+
// ...
152
+
);
153
+
154
+
copilot({
155
+
stepNumberComponent: StepNumberComponent
156
+
})(RootComponent)
157
+
```
158
+
141
159
### Custom components as steps
142
160
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