Skip to content

Commit ca4c022

Browse files
committed
chore: doc
1 parent 289e99e commit ca4c022

File tree

6 files changed

+154
-62
lines changed

6 files changed

+154
-62
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
* [Usage in Svelte](#usage-in-svelte)
5757
* [Examples](#examples-2)
5858
* [Usage in Vue](#usage-in-vue)
59-
* [Examples](#examples-3)
59+
* [Examples](#examples-3)
60+
* [Custom Transformer](#custom-transformer)
6061

6162

6263
[](#installation)
@@ -96,6 +97,7 @@ Run the following command from the root of your project:
9697
| autoPlay | `boolean` |
9798
| disableSwipe | `boolean` |
9899
| showIndicator | `boolean` |
100+
| transformers | `string` |
99101

100102

101103
```
@@ -198,6 +200,28 @@ Vue.use(Pager);
198200
- A simple pager example using static content.
199201
- [Basic Pager](demo-snippets/vue/BasicPager.vue)
200202
- A simple pager example using dynamic content.
203+
204+
205+
206+
[](#custom-transformer)
207+
208+
209+
[](#custom-transformer)
210+
211+
## Custom Transformer
212+
213+
You can define custom transformer for iOS/Android
214+
215+
You can follow the `Scale` example for [iOS](src/ui-pager/transformers/Scale.ios.ts) and [Android](src/ui-pager/transformers/Scale.android.ts) to create your custom transformer.
216+
217+
Then you can register your transformer on app start with (this example registered the included but not registered Scale transformer):
218+
```ts
219+
import { Pager } from '@nativescript-community/ui-pager';
220+
import transformer from '@nativescript-community/ui-pager/transformers/Scale';
221+
222+
Pager.registerTransformer('scale', transformer)
223+
```
224+
Then you can use that transformer with the `transformers` property of `Pager`
201225
</details><details>
202226
<summary><b>ui-pager-indicator</b></summary>
203227
<!-- ⚠️ This README has been generated from the file(s) "blueprint.md" ⚠️-->

docs/assets/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)