Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Can I change mouse hover timeout before tooltip appears? #1367

Closed
tuhlmann opened this issue Mar 1, 2022 · 2 comments
Closed

Comments

@tuhlmann
Copy link

tuhlmann commented Mar 1, 2022

Hi,

this is a React-MD 5 question, and I apologized if that's the wrong channel for questions.

I'm using <Tooltipped /> to create a tooltip around my component.

I would like to change the default time the mouse has to hover over the dom element until the tooltip appears, but I couldn't find any prop that would allow me to do that.

Is that possible with the current release?

Thanks!

@mlaursen
Copy link
Owner

mlaursen commented Mar 1, 2022

Yeap! This should be possible by wrapping your <Tooltipped /> component or part of your React tree with <HoverModeProvider defaultVisibileInTIme={TIME_IN_MS}>. I think I updated the tooltip components to use the "hover mode" functionality around 2.8.0 but I haven't found a good way to reflect these changes in the documentation.

@tuhlmann
Copy link
Author

tuhlmann commented Mar 1, 2022

Awesome, thank you for your quick reply!
I might then change the code to use the hook instead of the component if that's the preferred future proof way.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants