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
Move TypeScript, Custom Backgrounds, and Custom Components sections
out of the intro area into more appropriate locations. Add release
instructions under Contributing and add react-native-slider-intro
to Related Work.
Copy file name to clipboardExpand all lines: README.md
+50-40Lines changed: 50 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,6 @@ Your new users shouldn't jump in at the deep end. First give them a pleasurable,
11
11
12
12
Getting everything running merely takes a minute. Try out the example [running in your browser](https://snack.expo.io/dlQTGD06P). Or check out this [tutorial on YouTube](https://www.youtube.com/watch?v=SMkR-iIGvwQ).
13
13
14
-
## TypeScript
15
-
16
-
This library ships with built-in TypeScript declarations. No additional `@types` package is needed.
17
-
18
14
## Install
19
15
20
16
```bash
@@ -43,39 +39,6 @@ import Onboarding from 'react-native-onboarding-swiper';
43
39
/>
44
40
```
45
41
46
-
## Custom Backgrounds
47
-
48
-
You can use any React element as a page background (e.g. a linear gradient) via the `background` prop. Pair it with `isLight` to control text/dot colors since the library can't auto-detect brightness from a gradient.
You can also combine both `backgroundColor` and `background` on the same page — the solid color provides smooth animated transitions while the gradient covers it visually.
78
-
79
42
## Examples
80
43
81
44
Check out the three examples files: the [simple example](examples/Simple.js), the [example with a Call-to-Action button](examples/WithCTA.js) or the [example with custom button components](examples/CustomButtons.js).
@@ -168,16 +131,49 @@ For each page in the `pages` array, you can override the default page styles. [A
168
131
*`titleStyles` (optional): modify styles of a specific page's title.
169
132
*`subTitleStyles` (optional): modify styles of a specific page's subtitle.
170
133
171
-
## Custom Components Properties
134
+
###Custom Components
172
135
173
-
You can also provide your own custom components for the buttons and the dots. All of them have access to a `isLight` prop but it's up to you what you do with it. Also checkout [this example](examples/CustomButtons.js).
136
+
You can provide your own custom components for the buttons and the dots. All of them have access to a `isLight` prop but it's up to you what you do with it. Also checkout [this example](examples/CustomButtons.js).
174
137
175
138
*`SkipButtonComponent` (optional): Skip Button, gets `skipLabel` as prop.
176
139
*`NextButtonComponent` (optional): Next Button, gets `nextLabel` as prop.
177
140
*`DoneButtonComponent` (optional): Done Button.
178
141
*`DotComponent` (optional): Dot for the pagination, gets `selected` as prop to indicate the active page.
179
142
180
-
## Controlling the pages imperatively
143
+
### Custom Backgrounds
144
+
145
+
You can use any React element as a page background (e.g. a linear gradient) via the `background` prop. Pair it with `isLight` to control text/dot colors since the library can't auto-detect brightness from a gradient.
You can also combine both `backgroundColor` and `background` on the same page — the solid color provides smooth animated transitions while the gradient covers it visually.
175
+
176
+
## Controlling the pages imperatively
181
177
182
178
You can control the Onboarding component imperatively with [useRef](https://reactjs.org/docs/hooks-reference.html#useref).
Built-in TypeScript declarations are included. No additional `@types` package is needed.
228
+
229
229
## Contributing
230
230
231
231
If you have a **question**, found a **bug** or want to propose a new **feature**, have a look at the [issues page](https://github.com/jfilter/react-native-onboarding-swiper/issues).
232
232
233
233
**Pull requests** are especially welcomed when they fix bugs or improve the code quality.
234
234
235
+
### Releasing a new version
236
+
237
+
1. Update the version in `package.json`.
238
+
2. Add an entry to `CHANGELOG.md` with the new version number and a summary of changes.
0 commit comments