Open newarifrh opened 6 months ago
Thanks, this issue is happening with Tooltip in a few different contexts actually
I just found a problem because "-space-x-{n}" in the parent is not included in the calculations for floating components. And then I've tried natively for "@floating-ui/react", but it doesn't work well.
I got solution, because "@floating-ui/react" doesn't calculate the margin, we make component adjustments to the parent (avatar group) and child (avatar).
Steps to reproduce
package.json
Current behavior
Tooltip is not centered when wrapping avatar inside avatar group.
Expected behavior
Tooltip should be centered when wrapping avatar inside avatar group, like another component. For example tooltip wrapping button:
Context
This problem only appears when the tooltip wraps around an avatar inside avatar group. For avatars without wrapping avatar group, there is no problem.