1 |
<strong>import </strong><em>onClickOutside </em><strong>from 'react-onclickoutside'</strong>;<br>...<br><strong>class </strong>SomeComponent <strong>extends </strong><em>Component </em>{<br><br><em> handleClickOutside </em>= () => {<br> <strong>this</strong>.<strong>props</strong>.<strong>Callback</strong>();<br> };<br>...<br>}<br><strong>export default </strong><em>onClickOutside(SomeComponent</em>);<br><br> |