Visx: Tooltip Positioning Issue in Functional Components

Created on 7 May 2020  路  3Comments  路  Source: airbnb/visx

Hi, I am using vx for a project and spent several hours trying to correctly position a tooltip. In the sandbox provided in the docs its says that withTooltip wraps the component in a <div style="position: relative" />.

I think we should also manually do this for FunctionalComponents when using useTooltip (this is how I solved my positioning issue). If this is the case, can you please add a clear explanation to the docs?

Thank you for your amazing work!

hooks 馃惎example 馃憢help wanted 馃敭question

All 3 comments

@ahmetuysal 馃憢 , thanks for checking out vx. Ah yes, this is nuanced and should probably be added to get people going more quickly. I'd like to add a tooltip-only demo soon for the v1 release, in the meantime we could probably add this to the readme to get most of the way there?

PRs, welcome, otherwise I'll probably add it when adding a tooltip demo 馃憤

Sure, I will add it and open a pull request :)

Ah, you already opened a PR, thanks :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  5Comments

asteroidice picture asteroidice  路  3Comments

akhil9tiet picture akhil9tiet  路  3Comments

OKNoah picture OKNoah  路  5Comments

DarKDinDoN picture DarKDinDoN  路  4Comments