react-simple-tooltip
react-simple-tooltip copied to clipboard
Is it possible to open tool tip on click event?
how can we open tooltip on click event ?
For now you can use the standalone version
import React from "react"
import Tooltip from "react-simple-tooltip"
const App = () => (
<div style={{position: "relative"}}>
<Tooltip
style={{position: "absolute", top: "50%", right: "0"}}
content="😎"
/>
</div>
)
and trigger onClick to your component.
If you want to make a PR to use a syntax similar to this, I'm open :)
import React from "react"
import Tooltip from "react-simple-tooltip"
const App = () => (
<Tooltip content="😎" openOnClick>
<button>Hover me !</button>
</Tooltip>
)