react-component / react-component/tooltip
How to configure align offset?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 944
- Forks
- 199
- Avg merge
- 19h 1m
- Merged PRs (30d)
- 3
Description
I'm a bit confused on how do we set the offsetX and offsetY in the align prop. What I understand is that we can use this align prop to position the tooltip to the target node. But when I pass in a specific value of this, it shows in the browser's development tool that the left and top position of the tooltip element is different. I know the tooltip container is relative to the body but how do we set the align offset properly? I also tried setting getTooltipContainer but I can't still figuring out how to set the position properly. It seems like there area some calculations going on after passing the offset value. Hoping someone can elaborate the use of it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the align prop uses offsetX and offsetY, including the positioning calculations for the tooltip relative to the body. Check whether getTooltipContainer changes that behavior, then document the configuration and explain the observed left and top values so users can tell when the setup is correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100