Skip to content

Commit

Permalink
fix(main): properly fade out jar tooltips (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni authored Sep 13, 2024
1 parent 2454966 commit 1f6eddf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/jars/Jar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,14 @@ const SelectableJar = ({
*/
const OpenableJar = ({ tooltipText, onClick, ...jarProps }: OpenableJarProps) => {
const [jarIsOpen, setJarIsOpen] = useState(false)
const onMouseOver = () => setJarIsOpen(true)
const onMouseOut = () => setJarIsOpen(false)
const openJar = () => setJarIsOpen(true)
const closeJar = () => setJarIsOpen(false)

return (
<div onMouseOver={onMouseOver} onMouseOut={onMouseOut}>
<div onMouseOver={openJar} onMouseOut={closeJar}>
<rb.OverlayTrigger
placement="top"
trigger="hover"
popperConfig={{
modifiers: [
{
Expand Down

0 comments on commit 1f6eddf

Please sign in to comment.