Skip to content

Commit

Permalink
docs(example): add example for clickable prop
Browse files Browse the repository at this point in the history
  • Loading branch information
EndiM committed Mar 6, 2019
1 parent a75b2be commit f28716d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions example/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,27 @@ class Test extends React.Component {
" type={'light'}"}</p>
</div>
</pre>

<p>When <em>clickable</em> property is set to <em>true</em>, tooltip can respond to mouse (or touch) events.</p>
<p className="sub-title"></p>
<div className="example-jsx">
<div className="block" >
<a data-tip data-for='clickme' data-event='click'> (❂‿❂) </a>
</div>

<ReactTooltip id="clickme" place="right" effect="solid" clickable={true}>
<input type="text" placeholder="Type something..." />
</ReactTooltip>
</div>
<br />
<pre className='example-pre'>
<div>
<p>{"<a data-tip data-for='clickme' data-event='click'> (❂‿❂) </a>"}</p>
<p>{"<ReactTooltip id='clickme' place='right' effect='solid' clickable={true}>\n" +
"<input type='text' placeholder='Type something...' /> \n" +
"</ReactTooltip>"}</p>
</div>
</pre>
</div>

</section>
Expand Down

0 comments on commit f28716d

Please sign in to comment.