[Question] Can I change mouse hover timeout before tooltip appears?
tuhlmann opened this issue · 2 comments
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!
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.
- HoverModeProvider props/options
- useTooltip focus/touch delay options -- I'm not 100% sure if these are available in the
Tooltipped
component though since I kind of deprecated theTooltipped
component in favor of this hook.
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!