1
+ # My Capacitor Plugin 🔌
1
2
2
- # Haptics
3
+ The readme file can be formatted however you'd like. Just insert
4
+ the HTML placeholder comments where the index of the API
5
+ methods, and the API docs should go.
3
6
4
- The Haptics API provides physical feedback to the user through touch or vibration .
7
+ Below is an index of all the methods available .
5
8
6
9
<!-- DOCGEN_INDEX_START-->
7
10
* [ impact()] ( #impact )
@@ -12,56 +15,11 @@ The Haptics API provides physical feedback to the user through touch or vibratio
12
15
* [ Enums] ( #enums )
13
16
<!-- DOCGEN_INDEX_END-->
14
17
15
- ## Android Notes
18
+ ## Custom Content
16
19
17
- To use vibration, you must add this permission to your ` AndroidManifest.xml ` file:
18
-
19
- ``` xml
20
- <uses-permission android : name =" android.permission.VIBRATE" />
21
- ```
22
-
23
- ## Example
24
-
25
- ``` typescript
26
- import {
27
- Plugins ,
28
- HapticsImpactStyle
29
- } from ' @capacitor/core' ;
30
-
31
- const { Haptics } = Plugins ;
32
-
33
- export class HapticsExample {
34
- hapticsImpact(style = HapticsImpactStyle .Heavy ) {
35
- Haptics .impact ({
36
- style: style
37
- });
38
- }
39
-
40
- hapticsImpactMedium(style ) {
41
- this .hapticsImpact (HapticsImpactStyle .Medium );
42
- }
43
-
44
- hapticsImpactLight(style ) {
45
- this .hapticsImpact (HapticsImpactStyle .Light );
46
- }
47
-
48
- hapticsVibrate() {
49
- Haptics .vibrate ();
50
- }
51
-
52
- hapticsSelectionStart() {
53
- Haptics .selectionStart ();
54
- }
55
-
56
- hapticsSelectionChanged() {
57
- Haptics .selectionChanged ();
58
- }
59
-
60
- hapticsSelectionEnd() {
61
- Haptics .selectionEnd ();
62
- }
63
- }
64
- ```
20
+ Manage your readme content however you'd like, and on every docgen
21
+ rebuild it will leave your original content as is, but update the
22
+ HTML placeholder comments with the updated generated docs.
65
23
66
24
<!-- DOCGEN_API_START-->
67
25
<!-- Update the source file JSDoc comments and rerun docgen to update the docs below-->
@@ -198,3 +156,9 @@ Trigger a selection started haptic hint
198
156
199
157
200
158
<!-- DOCGEN_API_END-->
159
+
160
+ ## Commit Your Readme 🚀
161
+
162
+ The benefit of this readme file is that is also acts as the landing
163
+ page for the Github repo and NPM package, and the anchors within the
164
+ docs can also be linked to and shared.
0 commit comments