Skip to content

Commit 4c0eb36

Browse files
committed
docs: detailed props and events
1 parent 1e7162d commit 4c0eb36

File tree

1 file changed

+91
-3
lines changed

1 file changed

+91
-3
lines changed

README.md

Lines changed: 91 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,32 +41,120 @@ template:
4141
:is-show="isShow"
4242
type="underline"
4343
>
44-
<span>This is a text</span>
44+
<span>Rough Notation is awesome</span>
4545
</RoughNotation>
4646
```
4747

4848
## Props
4949

50-
Check [configuring-the-annotation](https://github.com/pshihn/rough-notation#configuring-the-annotation)
50+
### type
5151

52-
**and**
52+
**Type**: `string`
53+
54+
**required**: `true`
55+
56+
This is a mandatory field. It sets the annotation style. Following are the list of supported annotation types:
57+
58+
- **underline**: Create a sketchy underline below an element.
59+
- **box**: This style draws a box around the element.
60+
- **circle**: Draw a circle around the element.
61+
- **highlight**: Creates a highlight effect as if maked by a highlighter.
62+
- **strike-through**: This style draws a box around the element.
63+
- **crossed-off**: This style draws a box around the element.
5364

5465
### isShow
5566

5667
**Type**: `boolean`
5768

69+
**Required**: `false`
70+
5871
**Default**: `false`
5972

6073
Whether draws the annotation.
6174

75+
### animate
76+
77+
**Type**: `boolean`
78+
79+
**Required**: `false`
80+
81+
**Default**: `true`
82+
83+
Turn on/off animation when annotating.
84+
85+
### animationDuration
86+
87+
**Type**: `number`
88+
89+
**Required**: `false`
90+
91+
**Default**: `800`
92+
93+
Duration of the animation in milliseconds.
94+
95+
### animationDelay
96+
97+
**Type**: `number`
98+
99+
**Required**: `false`
100+
101+
**Default**: `0`
102+
103+
Delay in animation in milliseconds.
104+
105+
### color
106+
107+
**Type**: `string`
108+
109+
**Required**: `false`
110+
111+
**Default**: `currentColor`
112+
113+
Representing the color of the annotation sketch.
114+
115+
### strokeWidth
116+
117+
**Type**: `number`
118+
119+
**Required**: `false`
120+
121+
**Default**: `1`
122+
123+
Width of the annotation strokes.
124+
125+
### padding
126+
127+
**Type**: `number`
128+
129+
**Required**: `false`
130+
131+
**Default**: `5`(in pixels)
132+
133+
Padding between the element and roughly where the annotation is drawn.
134+
62135
### tag
63136

64137
**Type**: `string`
65138

139+
**Required**: `false`
140+
66141
**Default**: `'div'`
67142

68143
String HTML tag name (default: `div`); if falsy (for example `null` or `undefined`), the component will be renderless (the content won't be wrapped in a tag), in this case, only the first child will be rendered
69144

145+
## Events
146+
147+
### init
148+
149+
**Parameters**: [`Annotation Object`](https://github.com/pshihn/rough-notation#annotation-object)
150+
151+
Called when the component is initialized.
152+
153+
## TODO
154+
155+
- [ ] Annotation Group
156+
- [ ] Demo pages
157+
70158
## License
71159

72160
[MIT](https://github.com/Leecason/vue-rough-notation/blob/master/LICENSE)

0 commit comments

Comments
 (0)