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
+5-4
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,9 @@ import ReactTooltip from 'react-tooltip'
23
23
```
24
24
25
25
2 . Add data-tip = "your placeholder" to your element
26
-
27
-
<p data-tip="hello world">Tooltip</p>
26
+
```jsx
27
+
<p data-tip="hello world">Tooltip</p>
28
+
```
28
29
29
30
3 . Including react-tooltip component
30
31
@@ -122,14 +123,14 @@ method to control tooltip's behaviour in some situations
122
123
### 2. Hide tooltip when getContent returns undefined
123
124
When you set `getContent={() => { return }}` you will find the tooltip will dispaly `true`, that's because React will set the value of data-* to be 'true' automatically if there is no value to be set. So you have to set `data-tip=''` in this situaction.
0 commit comments