logto
logto copied to clipboard
Support vertical center in `usePosition` hook
In Logto admin console, the usePosition
hook is used in popover-ish components (tooltip, dropdown, etc.) to help locate their render positions relative to their parent component. Currently the supported alignments in the hook are:
- Horizontal: left, center, right
- Vertical: top, bottom
We would like to add vertical center
support to the hook, so that we will be able to implement tooltips that pop up sideways with a tail pointing to the vertical center of its parent. For example:
![image](https://user-images.githubusercontent.com/12833674/187843569-7957eb78-c440-45a2-8d5d-7af6c5e4e610.png)
Can i be assigned to this?
@FlurryNight go ahead
@FlurryNight Hi, any updates on this one? Let me know if you have any blocker and we can work this out together. Ping me on discord if you need anything
@FlurryNight Hi, any updates on this one? Let me know if you have any blocker and we can work this out together. Ping me on discord if you need anything
Hi, sorry for the delay. I didn't get it right and now I'll be busy for a while, but I managed to do a little, if it doesn't bother you I can show you how it is, I didn't quite understand the behavior of the hook