|
1 | | -# Your Plugin Name |
| 1 | +# UI Plugin example (Custom button component) |
2 | 2 |
|
3 | | -Add your plugin badges here. See [nativescript-urlhandler](https://github.com/hypery2k/nativescript-urlhandler) for example. |
4 | | - |
5 | | -Then describe what's the purpose of your plugin. |
6 | | - |
7 | | -In case you develop UI plugin, this is where you can add some screenshots. |
8 | | - |
9 | | -## (Optional) Prerequisites / Requirements |
10 | | - |
11 | | -Describe the prerequisites that the user need to have installed before using your plugin. See [nativescript-firebase plugin](https://github.com/eddyverbruggen/nativescript-plugin-firebase) for example. |
| 3 | +This plugin shows how you can build UI plugin using a Custom Component. A simple Button is given as example. |
12 | 4 |
|
13 | 5 | ## Installation |
14 | 6 |
|
15 | | -Describe your plugin installation steps. Ideally it would be something like: |
| 7 | +To install the plugin: |
16 | 8 |
|
17 | 9 | ```javascript |
18 | | -tns plugin add <your-plugin-name> |
| 10 | +tns plugin add nativescript-ui-plugin-custom |
19 | 11 | ``` |
20 | 12 |
|
21 | 13 | ## Usage |
22 | 14 |
|
23 | | -Describe any usage specifics for your plugin. Give examples for Android, iOS, Angular if needed. See [nativescript-drop-down](https://www.npmjs.com/package/nativescript-drop-down) for example. |
24 | | - |
25 | | - ```javascript |
26 | | - Usage code snippets here |
27 | | - ```) |
| 15 | +You need to add `xmlns:ui="nativescript-ui-plugin-custom"` to your page tag, and then simply use `<ui:MyButton text="MyButton1" />` in order to add the widget to your page. |
28 | 16 |
|
29 | 17 | ## API |
30 | 18 |
|
31 | 19 | Describe your plugin methods and properties here. See [nativescript-feedback](https://github.com/EddyVerbruggen/nativescript-feedback) for example. |
32 | 20 |
|
33 | 21 | | Property | Default | Description | |
34 | 22 | | --- | --- | --- | |
35 | | -| some property | property default value | property description, default values, etc.. | |
36 | | -| another property | property default value | property description, default values, etc.. | |
| 23 | +| text | "" | used to set the text of the button | |
| 24 | +| tap | "" | sets the callback that is called when the button is tapped | |
37 | 25 |
|
38 | 26 | ## License |
39 | 27 |
|
40 | | -Apache License Version 2.0, January 2004 |
| 28 | +Apache License Version 2.0, January 2004 |
0 commit comments