Skip to content

Instantly share code, notes, and snippets.

@roeib
Last active March 12, 2020 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roeib/8267850bbcb42f35f50ba73d44da8dfc to your computer and use it in GitHub Desktop.
Save roeib/8267850bbcb42f35f50ba73d44da8dfc to your computer and use it in GitHub Desktop.
const App = () => {
const [isOn, setOn] = useState(false);
return <div style={{overflow: "hidden"}}>
<Button onClick={e => {setOn(!isOn)}} >
Click me
</Button>
{
isOn &&
<Portal>
<Tooltip>
<div>This tooltip will not cut off!</div>
</Tooltip>
</Portal>
}
</div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment