-
-
Save dbilgili/828f6b5148d82491733bb956339ec0ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vim: syntax=JSX | |
return ( | |
isOpen && ReactDOM.createPortal( | |
<span onClick={e => e.stopPropagation()} style={style}>{React.cloneElement(child)}</span>, document.body | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment