You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm trying to activate e.g. a modal somewhere else (outside of the syntax highlighter component) on hover over a code line
Describe the solution you'd like
maybe something like onHover prop that the dev can pass a callback function to, to activate when a user e.g. hovers over said line
Describe alternatives you've considered
I hardcoded my own syntax highlighter to have a hover handler attached
I tried doing some raw JavaScript inside an useEffect on component mount to get the DOM element and attach an event listener onmouseenter but for some reason it wasn't working.
Briefly looked into useRef hook but wasn't sure how to get that to work correctly..
I also tried importing a JavaScript .js file with the DOM manipulations into the React component but I wasn't sure how to access the React hooks useState etc. from that file.
Additional context
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I'm trying to activate e.g. a modal somewhere else (outside of the syntax highlighter component) on hover over a code line
Describe the solution you'd like
maybe something like
onHover
prop that the dev can pass a callback function to, to activate when a user e.g. hovers over said lineDescribe alternatives you've considered
I hardcoded my own syntax highlighter to have a hover handler attached
I tried doing some raw JavaScript inside an useEffect on component mount to get the DOM element and attach an event listener
onmouseenter
but for some reason it wasn't working.Briefly looked into
useRef
hook but wasn't sure how to get that to work correctly..I also tried importing a JavaScript
.js
file with the DOM manipulations into the React component but I wasn't sure how to access the React hooksuseState
etc. from that file.Additional context
The text was updated successfully, but these errors were encountered: