Skip to content

Commit 31cdb5c

Browse files
committed
update docs
1 parent 56ac48e commit 31cdb5c

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,30 @@
1-
# nativescript-signaturepad
2-
NativeScript plugin to provide a way to capture signatures from the device.
1+
# NativeScript-SignaturePad :pencil:
2+
NativeScript plugin to provide a way to capture signatures (or any drawing) from the device.
3+
4+
#### Platform controls used:
5+
Android | iOS
6+
---------- | -----------
7+
[gcacace/android-signaturepad](https://github.com/gcacace/android-signaturepad) | [SignatureView](https://cocoapods.org/pods/SignatureView)
8+
9+
## Installation
10+
From your command prompt/termial go to your app's root folder and execute:
11+
`npm install nativescript-signaturepad`
12+
13+
## Usage
14+
```XML
15+
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
16+
xmlns:SignaturePad="nativescript-signaturepad">
17+
<StackLayout>
18+
<SignaturePad:SignaturePad id="drawingPad" penColor="#3489db" penWidth="5" />
19+
</StackLayout>
20+
</Page>
21+
```
22+
23+
## Attributes
24+
**penColor - (color string)** - *optional*
25+
26+
Attribute to specify the pen(stroke) color to use.
27+
28+
**penWidth - (int)** - *optional*
29+
30+
Attribute to specify the pen(stroke) width to use.

platforms/android/include.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//default elements
2+
android {
3+
productFlavors {
4+
"nativescriptsignaturepad" {
5+
dimension "nativescriptsignaturepad"
6+
}
7+
}
8+
}
9+
10+
dependencies {
11+
compile "com.github.gcacace:signature-pad:1.0.3"
12+
}

0 commit comments

Comments
 (0)