I'm working on a feature in my React project where when a user hovers over an element, which could contain an image or just text, a resize button appears in the top left corner and pressing down on that button while dragging the mouse will resize the element and it's contents accordingly.
I've already implemented showing the resize button on hover, but am having difficulty implementing the resizing feature.
For reference, I've attached a GIF of what I'm trying to implement. Resizing an Element