You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-6
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ yarn add react-tooltip
39
39
40
40
## Usage
41
41
42
-
**Using NPM**
42
+
### Using NPM
43
43
44
44
1 . Require react-tooltip after installation
45
45
@@ -55,11 +55,11 @@ import ReactTooltip from 'react-tooltip';
55
55
56
56
3 . Include react-tooltip component
57
57
58
-
```js
58
+
```jsx
59
59
<ReactTooltip />
60
60
```
61
61
62
-
**Standalone**
62
+
### Standalone
63
63
64
64
You can import `node_modules/react-tooltip/dist/index.js` into your page. Please make sure that you have already imported `react` and `react-dom` into your page.
65
65
@@ -107,7 +107,7 @@ Notes:
107
107
108
108
The `html` option allows a tooltip to directly display raw HTML. This is a security risk if any of that content is supplied by the user. Any user-supplied content must be sanitized, using a package like [sanitize-html-react](https://www.npmjs.com/package/sanitize-html-react). We chose not to include sanitization after discovering it [increased our package size](https://github.com/wwayne/react-tooltip/issues/429) too much - we don't want to penalize people who don't use the `html` option.
109
109
110
-
#####Note:
110
+
#### Note
111
111
112
112
1.**data-tip** is necessary, because `<ReactTooltip />` finds the tooltip via this attribute
113
113
2.**data-for** corresponds to the **id** of `<ReactTooltip />`
@@ -119,7 +119,7 @@ The `html` option allows a tooltip to directly display raw HTML. This is a secur
119
119
120
120
> Hide the tooltip manually, the target is optional, if no target passed in, all existing tooltips will be hidden
0 commit comments