Skip to content

Commit f28716d

Browse files
committed
docs(example): add example for clickable prop
fix #417
1 parent a75b2be commit f28716d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

example/src/index.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,27 @@ class Test extends React.Component {
404404
" type={'light'}"}</p>
405405
</div>
406406
</pre>
407+
408+
<p>When <em>clickable</em> property is set to <em>true</em>, tooltip can respond to mouse (or touch) events.</p>
409+
<p className="sub-title"></p>
410+
<div className="example-jsx">
411+
<div className="block" >
412+
<a data-tip data-for='clickme' data-event='click'> (❂‿❂) </a>
413+
</div>
414+
415+
<ReactTooltip id="clickme" place="right" effect="solid" clickable={true}>
416+
<input type="text" placeholder="Type something..." />
417+
</ReactTooltip>
418+
</div>
419+
<br />
420+
<pre className='example-pre'>
421+
<div>
422+
<p>{"<a data-tip data-for='clickme' data-event='click'> (❂‿❂) </a>"}</p>
423+
<p>{"<ReactTooltip id='clickme' place='right' effect='solid' clickable={true}>\n" +
424+
"<input type='text' placeholder='Type something...' /> \n" +
425+
"</ReactTooltip>"}</p>
426+
</div>
427+
</pre>
407428
</div>
408429

409430
</section>

0 commit comments

Comments
 (0)