Simply move get margin function to functional component as a part of Tooltip migration to functional component.
Depends on: D14103
Open some tooltips and verify they're positioned correctly.
I would make this a memo and replace the getter with the value itself. (Feel free to address this later in the stack)
Rebase and address feedback
Rebase