react-tooltip 4.5.1 → 5.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +25 -0
- package/.eslintrc.json +94 -0
- package/.gitattributes +3 -0
- package/.github/FUNDING.yml +13 -0
- package/.github/workflows/lint.yaml +35 -0
- package/.github/workflows/pull-request.yaml +11 -0
- package/.github/workflows/release.yaml +30 -0
- package/.husky/pre-commit +6 -0
- package/.prettierrc.json +10 -0
- package/.stylelintrc.json +19 -0
- package/.vscode/settings.json +27 -0
- package/bower.json +26 -0
- package/build/dist/react-tooltip.cjs.js +2909 -0
- package/build/dist/react-tooltip.cjs.min.js +6 -0
- package/build/dist/react-tooltip.css +73 -0
- package/build/dist/react-tooltip.esm.js +2901 -0
- package/build/dist/react-tooltip.esm.min.js +6 -0
- package/build/dist/react-tooltip.min.css +1 -0
- package/build/dist/react-tooltip.umd.js +2913 -0
- package/build/dist/react-tooltip.umd.min.js +6 -0
- package/build/index.css +79 -0
- package/build/index.html +19 -0
- package/build/index.js +36190 -0
- package/cli.js +30 -0
- package/contributing.md +40 -0
- package/dist/react-tooltip.cjs.js +2932 -0
- package/dist/react-tooltip.cjs.min.js +6 -0
- package/dist/react-tooltip.css +73 -0
- package/dist/react-tooltip.esm.js +2924 -0
- package/dist/react-tooltip.esm.min.js +6 -0
- package/dist/react-tooltip.min.css +1 -0
- package/dist/react-tooltip.umd.js +2936 -0
- package/dist/react-tooltip.umd.min.js +6 -0
- package/docs/README.md +50 -0
- package/docs/babel.config.js +3 -0
- package/docs/docs/examples/_category_.json +7 -0
- package/docs/docs/examples/basic-examples.mdx +68 -0
- package/docs/docs/examples/children.mdx +67 -0
- package/docs/docs/examples/content.mdx +80 -0
- package/docs/docs/examples/delay.mdx +84 -0
- package/docs/docs/examples/events.mdx +85 -0
- package/docs/docs/examples/get-content.mdx +58 -0
- package/docs/docs/examples/html.mdx +75 -0
- package/docs/docs/examples/multiline.mdx +91 -0
- package/docs/docs/examples/offset.mdx +69 -0
- package/docs/docs/examples/place.mdx +55 -0
- package/docs/docs/examples/state.mdx +331 -0
- package/docs/docs/examples/styling.mdx +388 -0
- package/docs/docs/examples/variant.mdx +100 -0
- package/docs/docs/getting-started.md +70 -0
- package/docs/docs/options.mdx +105 -0
- package/docs/docs/upgrade-guide/_category_.json +7 -0
- package/docs/docs/upgrade-guide/basic-examples-v4-v5.mdx +119 -0
- package/docs/docs/upgrade-guide/changelog-v4-v5.md +85 -0
- package/docs/docusaurus.config.js +126 -0
- package/docs/package.json +47 -0
- package/docs/sidebars.js +33 -0
- package/docs/src/components/HomepageFeatures/index.tsx +70 -0
- package/docs/src/components/HomepageFeatures/styles.module.css +11 -0
- package/docs/src/css/custom.css +74 -0
- package/docs/src/pages/index.module.css +35 -0
- package/docs/src/pages/index.tsx +42 -0
- package/docs/src/pages/markdown-page.md +7 -0
- package/docs/static/.nojekyll +0 -0
- package/docs/static/img/docusaurus.png +0 -0
- package/docs/static/img/favicon.ico +0 -0
- package/docs/static/img/logo.svg +1 -0
- package/docs/static/img/undraw_docusaurus_mountain.svg +171 -0
- package/docs/static/img/undraw_docusaurus_react.svg +170 -0
- package/docs/static/img/undraw_docusaurus_tree.svg +40 -0
- package/docs/tsconfig.json +7 -0
- package/docs/yarn.lock +7579 -0
- package/example-v5/package.json +21 -0
- package/example-v5/public/index.html +20 -0
- package/example-v5/public/manifest.json +8 -0
- package/example-v5/src/App.jsx +908 -0
- package/example-v5/src/index.css +238 -0
- package/example-v5/src/index.js +15 -0
- package/example-v5/src/index.scss +251 -0
- package/package.json +94 -146
- package/public/index.html +19 -0
- package/rollup.config.dev.js +88 -0
- package/rollup.config.prod.js +104 -0
- package/rollup.config.types.js +7 -0
- package/tsconfig.json +109 -0
- package/dist/index.es.js +0 -3185
- package/dist/index.es.js.map +0 -1
- package/dist/index.js +0 -3192
- package/dist/index.js.map +0 -1
- package/dist/react-tooltip.d.ts +0 -124
|
@@ -0,0 +1,908 @@
|
|
|
1
|
+
/* eslint-disable */ // --> OFF
|
|
2
|
+
import { useState, useEffect } from 'react'
|
|
3
|
+
|
|
4
|
+
import { Tooltip as ReactTooltip } from 'react-tooltip'
|
|
5
|
+
|
|
6
|
+
const App = () => {
|
|
7
|
+
const [place, setPlace] = useState('top')
|
|
8
|
+
const [variant, setVariant] = useState('dark')
|
|
9
|
+
const [effect, setEffect] = useState('float')
|
|
10
|
+
const [offset, setOffset] = useState(10)
|
|
11
|
+
const [wrapper, setWrapper] = useState('div')
|
|
12
|
+
const [anchorId, setAnchorId] = useState('anchorBuddy1')
|
|
13
|
+
const [isOpen, setIsOpen] = useState(false)
|
|
14
|
+
|
|
15
|
+
const changePlace = (value) => {
|
|
16
|
+
setPlace(value)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const changeVariant = (value) => {
|
|
20
|
+
setVariant(value)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const changeEffect = (value) => {
|
|
24
|
+
setEffect(value)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const changeOffset = (value) => {
|
|
28
|
+
setOffset(value)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const changeWrapper = (value) => {
|
|
32
|
+
setWrapper(value)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<div>
|
|
37
|
+
<section className="tooltip-example">
|
|
38
|
+
<h4 className="title">React Tooltip</h4>
|
|
39
|
+
<div className="demonstration">
|
|
40
|
+
<a
|
|
41
|
+
id="exampleTooltip"
|
|
42
|
+
data-content="Hello<br />multiline<br />tooltip"
|
|
43
|
+
data-iscapture="true"
|
|
44
|
+
data-place={place}
|
|
45
|
+
data-variant={variant}
|
|
46
|
+
data-offset={offset}
|
|
47
|
+
data-wrapper={wrapper}
|
|
48
|
+
>
|
|
49
|
+
◕‿‿◕
|
|
50
|
+
</a>
|
|
51
|
+
</div>
|
|
52
|
+
<div className="control-panel">
|
|
53
|
+
<div className="button-group">
|
|
54
|
+
<div className="item">
|
|
55
|
+
<p>Place</p>
|
|
56
|
+
<a
|
|
57
|
+
className={place === 'top' ? 'active' : ''}
|
|
58
|
+
onClick={() => {
|
|
59
|
+
changePlace('top')
|
|
60
|
+
}}
|
|
61
|
+
>
|
|
62
|
+
Top<span className="mark">(default)</span>
|
|
63
|
+
</a>
|
|
64
|
+
<a
|
|
65
|
+
className={place === 'right' ? 'active' : ''}
|
|
66
|
+
onClick={() => {
|
|
67
|
+
changePlace('right')
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
Right
|
|
71
|
+
</a>
|
|
72
|
+
<a
|
|
73
|
+
className={place === 'bottom' ? 'active' : ''}
|
|
74
|
+
onClick={() => {
|
|
75
|
+
changePlace('bottom')
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
Bottom
|
|
79
|
+
</a>
|
|
80
|
+
<a
|
|
81
|
+
className={place === 'left' ? 'active' : ''}
|
|
82
|
+
onClick={() => {
|
|
83
|
+
changePlace('left')
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
Left
|
|
87
|
+
</a>
|
|
88
|
+
</div>
|
|
89
|
+
<div className="item">
|
|
90
|
+
<p>Variant</p>
|
|
91
|
+
<a
|
|
92
|
+
className={variant === 'dark' ? 'active' : ''}
|
|
93
|
+
onClick={() => {
|
|
94
|
+
changeVariant('dark')
|
|
95
|
+
}}
|
|
96
|
+
>
|
|
97
|
+
Dark<span className="mark">(default)</span>
|
|
98
|
+
</a>
|
|
99
|
+
<a
|
|
100
|
+
className={variant === 'success' ? 'active' : ''}
|
|
101
|
+
onClick={() => {
|
|
102
|
+
changeVariant('success')
|
|
103
|
+
}}
|
|
104
|
+
>
|
|
105
|
+
Success
|
|
106
|
+
</a>
|
|
107
|
+
<a
|
|
108
|
+
className={variant === 'warning' ? 'active' : ''}
|
|
109
|
+
onClick={() => {
|
|
110
|
+
changeVariant('warning')
|
|
111
|
+
}}
|
|
112
|
+
>
|
|
113
|
+
Warning
|
|
114
|
+
</a>
|
|
115
|
+
<a
|
|
116
|
+
className={variant === 'error' ? 'active' : ''}
|
|
117
|
+
onClick={() => {
|
|
118
|
+
changeVariant('error')
|
|
119
|
+
}}
|
|
120
|
+
>
|
|
121
|
+
Error
|
|
122
|
+
</a>
|
|
123
|
+
<a
|
|
124
|
+
className={variant === 'info' ? 'active' : ''}
|
|
125
|
+
onClick={() => {
|
|
126
|
+
changeVariant('info')
|
|
127
|
+
}}
|
|
128
|
+
>
|
|
129
|
+
Info
|
|
130
|
+
</a>
|
|
131
|
+
<a
|
|
132
|
+
className={variant === 'light' ? 'active' : ''}
|
|
133
|
+
onClick={() => {
|
|
134
|
+
changeVariant('light')
|
|
135
|
+
}}
|
|
136
|
+
>
|
|
137
|
+
Light
|
|
138
|
+
</a>
|
|
139
|
+
</div>
|
|
140
|
+
<div className="item">
|
|
141
|
+
<p>Offset (any number)</p>
|
|
142
|
+
<a
|
|
143
|
+
className={offset === 10 ? 'active' : ''}
|
|
144
|
+
onClick={() => {
|
|
145
|
+
changeOffset(10)
|
|
146
|
+
}}
|
|
147
|
+
>
|
|
148
|
+
10<span className="mark">(default)</span>
|
|
149
|
+
</a>
|
|
150
|
+
<a
|
|
151
|
+
className={offset === 20 ? 'active' : ''}
|
|
152
|
+
onClick={() => {
|
|
153
|
+
changeOffset(20)
|
|
154
|
+
}}
|
|
155
|
+
>
|
|
156
|
+
20
|
|
157
|
+
</a>
|
|
158
|
+
<a
|
|
159
|
+
className={offset === 30 ? 'active' : ''}
|
|
160
|
+
onClick={() => {
|
|
161
|
+
changeOffset(30)
|
|
162
|
+
}}
|
|
163
|
+
>
|
|
164
|
+
30
|
|
165
|
+
</a>
|
|
166
|
+
<a
|
|
167
|
+
className={offset === 40 ? 'active' : ''}
|
|
168
|
+
onClick={() => {
|
|
169
|
+
changeOffset(40)
|
|
170
|
+
}}
|
|
171
|
+
>
|
|
172
|
+
40
|
|
173
|
+
</a>
|
|
174
|
+
<a
|
|
175
|
+
className={offset === 50 ? 'active' : ''}
|
|
176
|
+
onClick={() => {
|
|
177
|
+
changeOffset(50)
|
|
178
|
+
}}
|
|
179
|
+
>
|
|
180
|
+
50
|
|
181
|
+
</a>
|
|
182
|
+
</div>
|
|
183
|
+
<div className="item">
|
|
184
|
+
<p>Wrapper</p>
|
|
185
|
+
<a
|
|
186
|
+
className={wrapper === 'div' ? 'active' : ''}
|
|
187
|
+
onClick={() => {
|
|
188
|
+
changeWrapper('div')
|
|
189
|
+
}}
|
|
190
|
+
>
|
|
191
|
+
div<span className="mark">(default)</span>
|
|
192
|
+
</a>
|
|
193
|
+
<a
|
|
194
|
+
className={wrapper === 'span' ? 'active' : ''}
|
|
195
|
+
onClick={() => {
|
|
196
|
+
changeWrapper('span')
|
|
197
|
+
}}
|
|
198
|
+
>
|
|
199
|
+
span
|
|
200
|
+
</a>
|
|
201
|
+
<a
|
|
202
|
+
className={wrapper === 'section' ? 'active' : ''}
|
|
203
|
+
onClick={() => {
|
|
204
|
+
changeWrapper('section')
|
|
205
|
+
}}
|
|
206
|
+
>
|
|
207
|
+
section
|
|
208
|
+
</a>
|
|
209
|
+
</div>
|
|
210
|
+
<div className="item">
|
|
211
|
+
<p>Effect</p>
|
|
212
|
+
<a
|
|
213
|
+
className={effect === 'float' ? 'active' : ''}
|
|
214
|
+
onClick={() => {
|
|
215
|
+
changeEffect('float')
|
|
216
|
+
}}
|
|
217
|
+
>
|
|
218
|
+
Float<span className="mark">(default)</span>
|
|
219
|
+
</a>
|
|
220
|
+
<a
|
|
221
|
+
className={effect === 'solid' ? 'active' : ''}
|
|
222
|
+
onClick={() => {
|
|
223
|
+
changeEffect('solid')
|
|
224
|
+
}}
|
|
225
|
+
>
|
|
226
|
+
Solid
|
|
227
|
+
</a>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
<pre>
|
|
231
|
+
<div>
|
|
232
|
+
<p className="label">Code - Example 1</p>
|
|
233
|
+
<hr />
|
|
234
|
+
<p>
|
|
235
|
+
{`<a
|
|
236
|
+
id="exampleTooltip"
|
|
237
|
+
data-content="Hello<br />multiline<br />tooltip"
|
|
238
|
+
data-place={place}
|
|
239
|
+
data-variant={variant}
|
|
240
|
+
data-offset={offset}
|
|
241
|
+
data-wrapper={wrapper}
|
|
242
|
+
>
|
|
243
|
+
◕‿‿◕
|
|
244
|
+
</a>`}
|
|
245
|
+
</p>
|
|
246
|
+
<p>{'<ReactTooltip anchorId="exampleTooltip"/>'}</p>
|
|
247
|
+
</div>
|
|
248
|
+
</pre>
|
|
249
|
+
<pre>
|
|
250
|
+
<div>
|
|
251
|
+
<p className="label">Code - Example 2</p>
|
|
252
|
+
<hr />
|
|
253
|
+
<p>{`<a id="exampleTooltip">◕‿‿◕</a>`}</p>
|
|
254
|
+
<p>{`<ReactTooltip
|
|
255
|
+
anchorId="exampleTooltip"
|
|
256
|
+
content="Hello<br />multiline<br />tooltip"
|
|
257
|
+
place={place}
|
|
258
|
+
variant={variant}
|
|
259
|
+
offset={offset}
|
|
260
|
+
wrapper={wrapper}
|
|
261
|
+
/>`}</p>
|
|
262
|
+
</div>
|
|
263
|
+
</pre>
|
|
264
|
+
</div>
|
|
265
|
+
<ReactTooltip anchorId="exampleTooltip" />
|
|
266
|
+
</section>
|
|
267
|
+
<section className="advance">
|
|
268
|
+
<div className="section">
|
|
269
|
+
<h4 className="title">Advance features</h4>
|
|
270
|
+
<p className="sub-title">Use everything as tooltip</p>
|
|
271
|
+
|
|
272
|
+
<div className="example-jsx">
|
|
273
|
+
<div className="side" style={{ transform: 'translate3d(5px, 5px, 5px)' }}>
|
|
274
|
+
<a id="happyFaceError">d(`・∀・)b</a>
|
|
275
|
+
<ReactTooltip anchorId="happyFaceError" variant="error">
|
|
276
|
+
<span>Show happy face</span>
|
|
277
|
+
</ReactTooltip>
|
|
278
|
+
</div>
|
|
279
|
+
<div className="side">
|
|
280
|
+
<a id="sadFaceWarning">இдஇ</a>
|
|
281
|
+
<ReactTooltip anchorId="sadFaceWarning" variant="warning">
|
|
282
|
+
<span>Show sad face</span>
|
|
283
|
+
</ReactTooltip>
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
<br />
|
|
287
|
+
<pre className="example-pre">
|
|
288
|
+
<div>
|
|
289
|
+
<p>
|
|
290
|
+
{'<a id="happyFaceError"> d(`・∀・)b </a>\n' +
|
|
291
|
+
'<ReactTooltip anchorId="happyFaceError" variant=\'error\'>\n' +
|
|
292
|
+
' ' +
|
|
293
|
+
' ' +
|
|
294
|
+
'<span>Show happy face</span>\n' +
|
|
295
|
+
'</ReactTooltip>\n' +
|
|
296
|
+
'<a id="sadFaceWarning"> இдஇ </a>\n' +
|
|
297
|
+
'<ReactTooltip anchorId="sadFaceWarning" variant=\'warning\'>\n' +
|
|
298
|
+
' ' +
|
|
299
|
+
' ' +
|
|
300
|
+
'<span>Show sad face</span>\n' +
|
|
301
|
+
'</ReactTooltip>'}
|
|
302
|
+
</p>
|
|
303
|
+
</div>
|
|
304
|
+
</pre>
|
|
305
|
+
</div>
|
|
306
|
+
</section>
|
|
307
|
+
<section className="advance">
|
|
308
|
+
<div className="section">
|
|
309
|
+
<h4 className="title">Events</h4>
|
|
310
|
+
<p className="sub-title" />
|
|
311
|
+
<div className="example-jsx">
|
|
312
|
+
<div className="side-3">
|
|
313
|
+
<a
|
|
314
|
+
id="eventHoverOnlyAnchor"
|
|
315
|
+
data-content="default show and hide using hover events only"
|
|
316
|
+
>
|
|
317
|
+
( •̀д•́)
|
|
318
|
+
</a>
|
|
319
|
+
<ReactTooltip anchorId="eventHoverOnlyAnchor" events={['hover']} />
|
|
320
|
+
</div>
|
|
321
|
+
<div className="side-3">
|
|
322
|
+
<a
|
|
323
|
+
id="eventClickOnlyAnchor"
|
|
324
|
+
data-content="custom show and hide using click event only"
|
|
325
|
+
>
|
|
326
|
+
( •̀д•́)
|
|
327
|
+
</a>
|
|
328
|
+
<ReactTooltip anchorId="eventClickOnlyAnchor" events={['click']} />
|
|
329
|
+
</div>
|
|
330
|
+
<div className="side-3">
|
|
331
|
+
<a
|
|
332
|
+
id="clickAndHoverEvent"
|
|
333
|
+
data-content="custom show and hide using click and hover event"
|
|
334
|
+
data-events="click hover"
|
|
335
|
+
>
|
|
336
|
+
( •̀д•́)
|
|
337
|
+
</a>
|
|
338
|
+
<ReactTooltip anchorId="clickAndHoverEvent" />
|
|
339
|
+
</div>
|
|
340
|
+
</div>
|
|
341
|
+
<br />
|
|
342
|
+
<pre className="example-pre">
|
|
343
|
+
<div>
|
|
344
|
+
<p>
|
|
345
|
+
{'<a \n id="eventHoverOnlyAnchor" \n data-content="default show and hide using hover events only"\n>( •̀д•́)</a>\n' +
|
|
346
|
+
'<ReactTooltip anchorId="eventHoverOnlyAnchor" events={[\'hover\']} />'}
|
|
347
|
+
</p>
|
|
348
|
+
</div>
|
|
349
|
+
<div>
|
|
350
|
+
<p>
|
|
351
|
+
{'<a \n id="eventClickOnlyAnchor" \n data-content="custom show and hide using click event only"\n>( •̀д•́)</a>\n' +
|
|
352
|
+
'<ReactTooltip anchorId="eventClickOnlyAnchor" events={[\'click\']} />'}
|
|
353
|
+
</p>
|
|
354
|
+
</div>
|
|
355
|
+
<div>
|
|
356
|
+
------------------------------------------------ <br /> Option 1 for events
|
|
357
|
+
<p>
|
|
358
|
+
{'<a \n id="clickAndHoverEvent" \n data-content="custom show and hide using click and hover event" \n data-events="click hover"\n>( •̀д•́)</a>\n' +
|
|
359
|
+
'<ReactTooltip anchorId="clickAndHoverEvent" />'}
|
|
360
|
+
</p>
|
|
361
|
+
</div>
|
|
362
|
+
<div>
|
|
363
|
+
------------------------------------------------ <br /> Option 2 for events
|
|
364
|
+
<p>
|
|
365
|
+
{'<a \n id="clickAndHoverEvent" \n data-content="custom show and hide using click and hover event"\n>( •̀д•́)</a>\n' +
|
|
366
|
+
"<ReactTooltip anchorId=\"clickAndHoverEvent\" events={['click', 'hover']} />"}
|
|
367
|
+
</p>
|
|
368
|
+
</div>
|
|
369
|
+
</pre>
|
|
370
|
+
</div>
|
|
371
|
+
|
|
372
|
+
<div className="section">
|
|
373
|
+
<h4 className="title">Custom event</h4>
|
|
374
|
+
<p className="sub-title" />
|
|
375
|
+
<div className="example-jsx">
|
|
376
|
+
<div className="side-3">
|
|
377
|
+
<a
|
|
378
|
+
id="customEventHoverOnlyAnchor"
|
|
379
|
+
data-content="default show and hide using hover events only"
|
|
380
|
+
>
|
|
381
|
+
( •̀д•́)
|
|
382
|
+
</a>
|
|
383
|
+
<ReactTooltip anchorId="customEventHoverOnlyAnchor" events={['hover']} />
|
|
384
|
+
</div>
|
|
385
|
+
<div className="side-3">
|
|
386
|
+
<a
|
|
387
|
+
id="customEventClickOnlyAnchor"
|
|
388
|
+
data-content="custom show and hide using click event only"
|
|
389
|
+
>
|
|
390
|
+
( •̀д•́)
|
|
391
|
+
</a>
|
|
392
|
+
<ReactTooltip anchorId="customEventClickOnlyAnchor" events={['click']} />
|
|
393
|
+
</div>
|
|
394
|
+
<div className="side-3">
|
|
395
|
+
<a
|
|
396
|
+
id="customClickAndHoverEvent"
|
|
397
|
+
data-content="custom show and hide using click and hover event"
|
|
398
|
+
data-events="click hover"
|
|
399
|
+
>
|
|
400
|
+
( •̀д•́)
|
|
401
|
+
</a>
|
|
402
|
+
<ReactTooltip anchorId="customClickAndHoverEvent" />
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
<br />
|
|
406
|
+
<pre className="example-pre">
|
|
407
|
+
<div>
|
|
408
|
+
<p>
|
|
409
|
+
{'<a \n id="customEventHoverOnlyAnchor" \n data-content="default show and hide using hover events only"\n>( •̀д•́)</a>\n' +
|
|
410
|
+
'<ReactTooltip anchorId="customEventHoverOnlyAnchor" events={[\'hover\']} />'}
|
|
411
|
+
</p>
|
|
412
|
+
</div>
|
|
413
|
+
<div>
|
|
414
|
+
<p>
|
|
415
|
+
{'<a \n id="customEventClickOnlyAnchor" \n data-content="custom show and hide using click event only"\n>( •̀д•́)</a>\n' +
|
|
416
|
+
'<ReactTooltip anchorId="customEventClickOnlyAnchor" events={[\'click\']} />'}
|
|
417
|
+
</p>
|
|
418
|
+
</div>
|
|
419
|
+
<div>
|
|
420
|
+
------------------------------------------------ <br /> Option 1 for events
|
|
421
|
+
<p>
|
|
422
|
+
{'<a \n id="customClickAndHoverEvent" \n data-content="custom show and hide using click and hover event" \n data-events="click hover"\n>( •̀д•́)</a>\n' +
|
|
423
|
+
'<ReactTooltip anchorId="customClickAndHoverEvent" />'}
|
|
424
|
+
</p>
|
|
425
|
+
</div>
|
|
426
|
+
<div>
|
|
427
|
+
------------------------------------------------ <br /> Option 2 for events
|
|
428
|
+
<p>
|
|
429
|
+
{'<a \n id="customClickAndHoverEvent" \n data-content="custom show and hide using click and hover event"\n>( •̀д•́)</a>\n' +
|
|
430
|
+
"<ReactTooltip anchorId=\"customClickAndHoverEvent\" events={['click', 'hover']} />"}
|
|
431
|
+
</p>
|
|
432
|
+
</div>
|
|
433
|
+
</pre>
|
|
434
|
+
</div>
|
|
435
|
+
|
|
436
|
+
<div className="section">
|
|
437
|
+
<h4 className="title">Custom colors</h4>
|
|
438
|
+
<p className="sub-title" />
|
|
439
|
+
<div className="example-jsx">
|
|
440
|
+
<div className="side">
|
|
441
|
+
<a data-for="custom-color-no-arrow" data-content="Lovely colors!">
|
|
442
|
+
ㅇㅅㅇ
|
|
443
|
+
</a>
|
|
444
|
+
<ReactTooltip
|
|
445
|
+
id="custom-color-no-arrow"
|
|
446
|
+
className="custom-color-no-arrow"
|
|
447
|
+
textColor="#5F4B8BFF"
|
|
448
|
+
backgroundColor="#E69A8DFF"
|
|
449
|
+
effect="solid"
|
|
450
|
+
/>
|
|
451
|
+
</div>
|
|
452
|
+
<div className="side">
|
|
453
|
+
<a
|
|
454
|
+
data-for="custom-color"
|
|
455
|
+
data-content="That is one weird arrow (and a border with custom class name)!"
|
|
456
|
+
>
|
|
457
|
+
V(^-^)V
|
|
458
|
+
</a>
|
|
459
|
+
<ReactTooltip
|
|
460
|
+
id="custom-color"
|
|
461
|
+
className="custom-color"
|
|
462
|
+
place="right"
|
|
463
|
+
border
|
|
464
|
+
borderClass="custom-border-class"
|
|
465
|
+
textColor="#5F4B8BFF"
|
|
466
|
+
backgroundColor="#E69A8DFF"
|
|
467
|
+
borderColor="darkgreen"
|
|
468
|
+
arrowColor="red"
|
|
469
|
+
/>
|
|
470
|
+
</div>
|
|
471
|
+
</div>
|
|
472
|
+
<br />
|
|
473
|
+
<pre className="example-pre">
|
|
474
|
+
<div>
|
|
475
|
+
<p>
|
|
476
|
+
{"<a data-for='custom-color-no-arrow' data-content='Lovely colors!'>ㅇㅅㅇ</a>\n" +
|
|
477
|
+
"<ReactTooltip id='custom-color-no-arrow' className='custom-color-no-arrow' delayHide={1000}\n" +
|
|
478
|
+
"textColor='#5F4B8BFF' backgroundColor='#E69A8DFF' effect='solid'/>"}
|
|
479
|
+
</p>
|
|
480
|
+
</div>
|
|
481
|
+
<div>
|
|
482
|
+
<p>
|
|
483
|
+
{"<a data-for='custom-color' data-content='That is one weird arrow (and a border)!'>V(^-^)V</a>\n" +
|
|
484
|
+
"<ReactTooltip id='custom-color' className='custom-color' place='right' border\n" +
|
|
485
|
+
"textColor='#5F4B8BFF' backgroundColor='#E69A8DFF' borderColor='darkgreen' arrowColor='red'/>"}
|
|
486
|
+
</p>
|
|
487
|
+
</div>
|
|
488
|
+
</pre>
|
|
489
|
+
</div>
|
|
490
|
+
|
|
491
|
+
<div className="section">
|
|
492
|
+
<h4 className="title">Delays</h4>
|
|
493
|
+
<p className="sub-title" />
|
|
494
|
+
<div className="example-jsx">
|
|
495
|
+
<div className="side">
|
|
496
|
+
<a
|
|
497
|
+
id="delayShowAnchor"
|
|
498
|
+
data-content="delayed 3 seconds tooltip content"
|
|
499
|
+
data-delay-show={3000}
|
|
500
|
+
>
|
|
501
|
+
(・ω´・ )
|
|
502
|
+
</a>
|
|
503
|
+
<ReactTooltip anchorId="delayShowAnchor" />
|
|
504
|
+
</div>
|
|
505
|
+
<div className="side">
|
|
506
|
+
<a
|
|
507
|
+
id="delayHideAnchor"
|
|
508
|
+
data-content="hover on me will keep the tooltip"
|
|
509
|
+
data-delay-hide={3000}
|
|
510
|
+
>
|
|
511
|
+
(・ω´・ )
|
|
512
|
+
</a>
|
|
513
|
+
<ReactTooltip anchorId="delayHideAnchor" />
|
|
514
|
+
</div>
|
|
515
|
+
</div>
|
|
516
|
+
<br />
|
|
517
|
+
<pre className="example-pre">
|
|
518
|
+
<div>
|
|
519
|
+
<p>
|
|
520
|
+
{`<a
|
|
521
|
+
id="delayShowAnchor"
|
|
522
|
+
data-content="delayed 3 seconds tooltip content"
|
|
523
|
+
data-delay-show={3000}
|
|
524
|
+
>
|
|
525
|
+
(・ω´・ )
|
|
526
|
+
</a>
|
|
527
|
+
<ReactTooltip anchorId="delayShowAnchor" />`}
|
|
528
|
+
</p>
|
|
529
|
+
</div>
|
|
530
|
+
<div>
|
|
531
|
+
<p>
|
|
532
|
+
{`<a
|
|
533
|
+
id="delayHideAnchor"
|
|
534
|
+
data-content="hover on me will keep the tooltip"
|
|
535
|
+
data-delay-hide={3000}
|
|
536
|
+
>
|
|
537
|
+
(・ω´・ )
|
|
538
|
+
</a>
|
|
539
|
+
<ReactTooltip anchorId="delayHideAnchor" />`}
|
|
540
|
+
</p>
|
|
541
|
+
</div>
|
|
542
|
+
</pre>
|
|
543
|
+
</div>
|
|
544
|
+
|
|
545
|
+
<div className="section">
|
|
546
|
+
<h4 className="title">Custom Classes</h4>
|
|
547
|
+
<p className="sub-title" />
|
|
548
|
+
<div className="example-jsx">
|
|
549
|
+
<div className="side">
|
|
550
|
+
<a
|
|
551
|
+
id="customClassAnchor"
|
|
552
|
+
data-content="This tooltip has custom class for tooltip and for arrow"
|
|
553
|
+
>
|
|
554
|
+
(・ω´・ )
|
|
555
|
+
</a>
|
|
556
|
+
<ReactTooltip
|
|
557
|
+
anchorId="customClassAnchor"
|
|
558
|
+
className="extraClass"
|
|
559
|
+
classNameArrow="extraClassArrow"
|
|
560
|
+
/>
|
|
561
|
+
</div>
|
|
562
|
+
</div>
|
|
563
|
+
<br />
|
|
564
|
+
<pre className="example-pre">
|
|
565
|
+
<div>
|
|
566
|
+
<p>
|
|
567
|
+
{"<a data-content='This tooltip has custom class for tooltip and for arrow'>(・ω´・ )</a>\n" +
|
|
568
|
+
"<ReactTooltip\n className='extraClass'\n classNameArrow='extraClassArrow'\n delayHide={1000}\n effect='solid'/>\n\n" +
|
|
569
|
+
'.extraClass {\n' +
|
|
570
|
+
' font-size: 20px;\n' +
|
|
571
|
+
' background-color: #00ffe5;\n' +
|
|
572
|
+
' color: #222;\n' +
|
|
573
|
+
'}\n' +
|
|
574
|
+
'.extraClass .extraClassArrow {\n' +
|
|
575
|
+
' background-color: #00ffe5;\n' +
|
|
576
|
+
'}\n\n'}
|
|
577
|
+
You don't need to use <b>!important</b>. You can just use CSS Specificity knowledge.{' '}
|
|
578
|
+
<br />
|
|
579
|
+
https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity <br />
|
|
580
|
+
https://www.w3schools.com/css/css_specificity.asp
|
|
581
|
+
</p>
|
|
582
|
+
</div>
|
|
583
|
+
</pre>
|
|
584
|
+
</div>
|
|
585
|
+
|
|
586
|
+
<div className="section">
|
|
587
|
+
<h4 className="title">Compute or enrich tip content</h4>
|
|
588
|
+
<p className="sub-title" />
|
|
589
|
+
<div className="example-jsx">
|
|
590
|
+
<div className="side">
|
|
591
|
+
<a id="enrichAnchor" data-content="sooooo cute">
|
|
592
|
+
(❂‿❂)
|
|
593
|
+
</a>
|
|
594
|
+
</div>
|
|
595
|
+
<div className="side">
|
|
596
|
+
<a id="enrichAnchor2" data-content="really high">
|
|
597
|
+
(❂‿❂)
|
|
598
|
+
</a>
|
|
599
|
+
</div>
|
|
600
|
+
<ReactTooltip
|
|
601
|
+
anchorId="enrichAnchor"
|
|
602
|
+
getContent={(dataTip) => `This little buddy is ${dataTip}`}
|
|
603
|
+
/>
|
|
604
|
+
<ReactTooltip
|
|
605
|
+
anchorId="enrichAnchor2"
|
|
606
|
+
getContent={(dataTip) => `This little buddy is ${dataTip}`}
|
|
607
|
+
/>
|
|
608
|
+
</div>
|
|
609
|
+
<br />
|
|
610
|
+
<pre className="example-pre">
|
|
611
|
+
<div>
|
|
612
|
+
<p>
|
|
613
|
+
{"<a data-for='enrich' data-content='sooooo cute'>(❂‿❂)</a>\n" +
|
|
614
|
+
"<a data-for='enrich' data-content='really high'>(❂‿❂)</a>\n" +
|
|
615
|
+
"<ReactTooltip id='enrich' getContent={(dataTip) => `This little buddy is ${dataTip}`}/>"}
|
|
616
|
+
</p>
|
|
617
|
+
</div>
|
|
618
|
+
</pre>
|
|
619
|
+
</div>
|
|
620
|
+
|
|
621
|
+
<div className="section">
|
|
622
|
+
<h4 className="title">Test Scrolling</h4>
|
|
623
|
+
<p className="sub-title" />
|
|
624
|
+
<div className="example-jsx" style={{ height: '200px' }}>
|
|
625
|
+
<div className="side" style={{ overflow: 'auto', height: '200px' }}>
|
|
626
|
+
<div
|
|
627
|
+
data-for="scrollContent"
|
|
628
|
+
data-content
|
|
629
|
+
data-iscapture="true"
|
|
630
|
+
style={{ width: '5000px', height: '5000px' }}
|
|
631
|
+
>
|
|
632
|
+
Scroll me with the mouse wheel.
|
|
633
|
+
<br />
|
|
634
|
+
The tooltip will hide.
|
|
635
|
+
<br />
|
|
636
|
+
Make sure you set data-iscapture="true"
|
|
637
|
+
</div>
|
|
638
|
+
<ReactTooltip id="scrollContent" getContent={() => Math.floor(Math.random() * 100)} />
|
|
639
|
+
</div>
|
|
640
|
+
<div className="side" style={{ overflow: 'auto', height: '200px' }}>
|
|
641
|
+
<div
|
|
642
|
+
data-for="scrollTime"
|
|
643
|
+
data-content
|
|
644
|
+
data-iscapture="true"
|
|
645
|
+
data-scroll-hide="false"
|
|
646
|
+
style={{ width: '5000px', height: '5000px' }}
|
|
647
|
+
>
|
|
648
|
+
Scroll me with the mouse wheel.
|
|
649
|
+
<br />
|
|
650
|
+
The tooltip will stay visible.
|
|
651
|
+
</div>
|
|
652
|
+
<ReactTooltip
|
|
653
|
+
id="scrollTime"
|
|
654
|
+
// getContent={[
|
|
655
|
+
// () => {
|
|
656
|
+
// return new Date().toISOString()
|
|
657
|
+
// },
|
|
658
|
+
// 1000,
|
|
659
|
+
// ]}
|
|
660
|
+
/>
|
|
661
|
+
</div>
|
|
662
|
+
</div>
|
|
663
|
+
<br />
|
|
664
|
+
<pre className="example-pre">
|
|
665
|
+
<div>
|
|
666
|
+
<p>
|
|
667
|
+
{"<div data-for='scrollContent' data-content data-iscapture='true'\n" +
|
|
668
|
+
"style={{ width: '5000px', height: '5000px' }}>...</div>\n" +
|
|
669
|
+
"<ReactTooltip id='scrollContent' getContent={() => Math.floor(Math.random() * 100)}/>"}
|
|
670
|
+
</p>
|
|
671
|
+
</div>
|
|
672
|
+
<div>
|
|
673
|
+
<p>
|
|
674
|
+
{"<div data-for='scrollTime' data-content data-iscapture='true' data-scroll-hide='false'\n" +
|
|
675
|
+
"style={{ width: '5000px', height: '5000px' }}>...</div>\n" +
|
|
676
|
+
"<ReactTooltip id='scrollTime' getContent={[() => {return new Date().toISOString()}, 1000]}/>"}
|
|
677
|
+
</p>
|
|
678
|
+
</div>
|
|
679
|
+
</pre>
|
|
680
|
+
</div>
|
|
681
|
+
|
|
682
|
+
<div className="section">
|
|
683
|
+
<h4 className="title">Test SVG</h4>
|
|
684
|
+
<p className="sub-title" />
|
|
685
|
+
<div className="example-jsx">
|
|
686
|
+
<div className="side" style={{ textAlign: 'center' }}>
|
|
687
|
+
<svg data-content="=( •̀д•́)" id="svgTooltipAnchor" width="50" height="50">
|
|
688
|
+
<circle cx="25" cy="25" r="22" fill="#fff" stroke="#000" strokeWidth="4" />
|
|
689
|
+
</svg>
|
|
690
|
+
<ReactTooltip anchorId="svgTooltipAnchor" />
|
|
691
|
+
</div>
|
|
692
|
+
<div className="side" style={{ textAlign: 'center' }}>
|
|
693
|
+
<svg width="75" height="50">
|
|
694
|
+
<circle
|
|
695
|
+
data-content="=( •̀‿•́)"
|
|
696
|
+
id="svgTooltip2Anchor"
|
|
697
|
+
cx="25"
|
|
698
|
+
cy="25"
|
|
699
|
+
r="22"
|
|
700
|
+
fill="#fff"
|
|
701
|
+
stroke="#000"
|
|
702
|
+
strokeWidth="4"
|
|
703
|
+
/>
|
|
704
|
+
<circle
|
|
705
|
+
data-content="=( ❂‿❂)"
|
|
706
|
+
id="svgTooltip3Anchor"
|
|
707
|
+
cx="50"
|
|
708
|
+
cy="25"
|
|
709
|
+
r="16"
|
|
710
|
+
fill="#ddd"
|
|
711
|
+
stroke="#444"
|
|
712
|
+
strokeWidth="4"
|
|
713
|
+
/>
|
|
714
|
+
</svg>
|
|
715
|
+
<ReactTooltip anchorId="svgTooltip2Anchor" />
|
|
716
|
+
<ReactTooltip anchorId="svgTooltip3Anchor" />
|
|
717
|
+
</div>
|
|
718
|
+
</div>
|
|
719
|
+
<br />
|
|
720
|
+
<pre className="example-pre">
|
|
721
|
+
<div>
|
|
722
|
+
<p>
|
|
723
|
+
{"<svg data-content='=( •̀д•́)' id=\"svgTooltipAnchor\" width='50' height='50'>\n" +
|
|
724
|
+
" <circle cx='25' cy='25' r='22' fill='#fff' stroke='#000' strokeWidth='8'/>\n" +
|
|
725
|
+
'</svg>\n' +
|
|
726
|
+
'<ReactTooltip anchorId="svgTooltipAnchor" />'}
|
|
727
|
+
</p>
|
|
728
|
+
<p>
|
|
729
|
+
{"<svg width='75' height='50'>\n" +
|
|
730
|
+
'<circle \n data-content=\'=( •̀‿•́)\' \n id="svgTooltip2Anchor"\n' +
|
|
731
|
+
" cx='25' cy='25' r='22' fill='#fff' stroke='#000' strokeWidth='4'/>\n" +
|
|
732
|
+
'<circle \n data-content=\'=( ❂‿❂)\' \n id="svgTooltip3Anchor"\n' +
|
|
733
|
+
" cx='50' cy='25' r='16' fill='#fdf' stroke='#404' strokeWidth='4'/>\n" +
|
|
734
|
+
'</svg>\n' +
|
|
735
|
+
'<ReactTooltip anchorId="svgTooltip2Anchor" /> \n<ReactTooltip anchorId="svgTooltip3Anchor" />'}
|
|
736
|
+
</p>
|
|
737
|
+
</div>
|
|
738
|
+
</pre>
|
|
739
|
+
</div>
|
|
740
|
+
|
|
741
|
+
<div className="section">
|
|
742
|
+
<h4 className="title">Demonstrate using mouse in tooltip. </h4>
|
|
743
|
+
<p>
|
|
744
|
+
Notice that the tooltip delays going away so you can get your mouse in it. You must set
|
|
745
|
+
delayUpdate and delayHide for the tooltip to stay long enough to get your mouse over it.
|
|
746
|
+
</p>
|
|
747
|
+
<p className="sub-title" />
|
|
748
|
+
<div className="example-jsx">
|
|
749
|
+
<div className="block">
|
|
750
|
+
<a
|
|
751
|
+
id="anchorBuddy1"
|
|
752
|
+
onMouseEnter={() => {
|
|
753
|
+
setAnchorId('anchorBuddy1')
|
|
754
|
+
setIsOpen(true)
|
|
755
|
+
}}
|
|
756
|
+
data-content="1"
|
|
757
|
+
>
|
|
758
|
+
1 (❂‿❂)
|
|
759
|
+
</a>
|
|
760
|
+
</div>
|
|
761
|
+
<div className="block">
|
|
762
|
+
<a
|
|
763
|
+
id="anchorBuddy2"
|
|
764
|
+
onMouseEnter={() => {
|
|
765
|
+
setAnchorId('anchorBuddy2')
|
|
766
|
+
setIsOpen(true)
|
|
767
|
+
}}
|
|
768
|
+
data-content="2"
|
|
769
|
+
>
|
|
770
|
+
2 (❂‿❂)
|
|
771
|
+
</a>
|
|
772
|
+
</div>
|
|
773
|
+
<div className="block">
|
|
774
|
+
<a
|
|
775
|
+
id="anchorBuddy3"
|
|
776
|
+
onMouseEnter={() => {
|
|
777
|
+
setAnchorId('anchorBuddy3')
|
|
778
|
+
setIsOpen(true)
|
|
779
|
+
}}
|
|
780
|
+
data-content="3"
|
|
781
|
+
>
|
|
782
|
+
3 (❂‿❂)
|
|
783
|
+
</a>
|
|
784
|
+
</div>
|
|
785
|
+
<div className="block">
|
|
786
|
+
<a
|
|
787
|
+
id="anchorBuddy4"
|
|
788
|
+
onMouseEnter={() => {
|
|
789
|
+
setAnchorId('anchorBuddy4')
|
|
790
|
+
setIsOpen(true)
|
|
791
|
+
}}
|
|
792
|
+
data-content="4"
|
|
793
|
+
>
|
|
794
|
+
4 (❂‿❂)
|
|
795
|
+
</a>
|
|
796
|
+
</div>
|
|
797
|
+
<div className="block">
|
|
798
|
+
<a
|
|
799
|
+
id="anchorBuddy5"
|
|
800
|
+
onMouseEnter={() => {
|
|
801
|
+
setAnchorId('anchorBuddy5')
|
|
802
|
+
setIsOpen(true)
|
|
803
|
+
}}
|
|
804
|
+
data-content="5"
|
|
805
|
+
>
|
|
806
|
+
5 (❂‿❂)
|
|
807
|
+
</a>
|
|
808
|
+
</div>
|
|
809
|
+
<div className="block">
|
|
810
|
+
<a
|
|
811
|
+
id="anchorBuddy6"
|
|
812
|
+
onMouseEnter={() => {
|
|
813
|
+
setAnchorId('anchorBuddy6')
|
|
814
|
+
setIsOpen(true)
|
|
815
|
+
}}
|
|
816
|
+
data-content="6"
|
|
817
|
+
>
|
|
818
|
+
6 (❂‿❂)
|
|
819
|
+
</a>
|
|
820
|
+
</div>
|
|
821
|
+
<div className="block">
|
|
822
|
+
<a
|
|
823
|
+
id="anchorBuddy7"
|
|
824
|
+
onMouseEnter={() => {
|
|
825
|
+
setAnchorId('anchorBuddy7')
|
|
826
|
+
setIsOpen(true)
|
|
827
|
+
}}
|
|
828
|
+
data-content="7"
|
|
829
|
+
>
|
|
830
|
+
7 (❂‿❂)
|
|
831
|
+
</a>
|
|
832
|
+
</div>
|
|
833
|
+
<div className="block">
|
|
834
|
+
<a
|
|
835
|
+
id="anchorBuddy8"
|
|
836
|
+
onMouseEnter={() => {
|
|
837
|
+
setAnchorId('anchorBuddy8')
|
|
838
|
+
setIsOpen(true)
|
|
839
|
+
}}
|
|
840
|
+
data-content="8"
|
|
841
|
+
>
|
|
842
|
+
8 (❂‿❂)
|
|
843
|
+
</a>
|
|
844
|
+
</div>
|
|
845
|
+
|
|
846
|
+
<ReactTooltip
|
|
847
|
+
anchorId={anchorId}
|
|
848
|
+
getContent={(dataTip) => `This little buddy is ${dataTip}`}
|
|
849
|
+
place="top"
|
|
850
|
+
isOpen={isOpen}
|
|
851
|
+
/>
|
|
852
|
+
</div>
|
|
853
|
+
<br />
|
|
854
|
+
<pre className="example-pre">
|
|
855
|
+
<div>
|
|
856
|
+
<p>{"<a data-for='soclose' data-content='1'>1 (❂‿❂)</a>"}</p>
|
|
857
|
+
<p>{"<a data-for='soclose' data-content='2'>2 (❂‿❂)</a>..."}</p>
|
|
858
|
+
<p>{"<a data-for='soclose' data-content='8'>8 (❂‿❂)</a>"}</p>
|
|
859
|
+
<p>
|
|
860
|
+
{"<ReactTooltip id='soclose'\n" +
|
|
861
|
+
' getContent={(dataTip) => \n' +
|
|
862
|
+
' <div><h3>This little buddy is {dataTip}</h3><p>Put mouse here</p></div> }\n' +
|
|
863
|
+
" effect='solid'\n" +
|
|
864
|
+
' delayHide={500}\n' +
|
|
865
|
+
' delayShow={500}\n' +
|
|
866
|
+
' delayUpdate={500}\n' +
|
|
867
|
+
" place={'right'}\n" +
|
|
868
|
+
' border={true}\n' +
|
|
869
|
+
" variant={'light'}\n" +
|
|
870
|
+
'/>'}
|
|
871
|
+
</p>
|
|
872
|
+
</div>
|
|
873
|
+
</pre>
|
|
874
|
+
|
|
875
|
+
<p>
|
|
876
|
+
When <em>clickable</em> property is set to <em>true</em>, tooltip can respond to mouse
|
|
877
|
+
(or touch) events.
|
|
878
|
+
</p>
|
|
879
|
+
<p className="sub-title" />
|
|
880
|
+
<div className="example-jsx">
|
|
881
|
+
<div className="block">
|
|
882
|
+
<a data-content data-for="clickme" data-event="click">
|
|
883
|
+
(❂‿❂)
|
|
884
|
+
</a>
|
|
885
|
+
</div>
|
|
886
|
+
|
|
887
|
+
<ReactTooltip id="clickme" place="right" effect="solid" clickable>
|
|
888
|
+
<input type="text" placeholder="Type something..." />
|
|
889
|
+
</ReactTooltip>
|
|
890
|
+
</div>
|
|
891
|
+
<br />
|
|
892
|
+
<pre className="example-pre">
|
|
893
|
+
<div>
|
|
894
|
+
<p>{"<a data-content data-for='clickme' data-event='click'> (❂‿❂) </a>"}</p>
|
|
895
|
+
<p>
|
|
896
|
+
{"<ReactTooltip id='clickme' place='right' effect='solid' clickable={true}>\n" +
|
|
897
|
+
"<input type='text' placeholder='Type something...' /> \n" +
|
|
898
|
+
'</ReactTooltip>'}
|
|
899
|
+
</p>
|
|
900
|
+
</div>
|
|
901
|
+
</pre>
|
|
902
|
+
</div>
|
|
903
|
+
</section>
|
|
904
|
+
</div>
|
|
905
|
+
)
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
export default App
|