Resizing InfoPopover or Tooltips that are made of a rectangle plus caret

How to make a resizable tool tip or popover component, that have a caret in one side?
I need to keep the caret at the same size and same position while resizing the content of the popover component. Once I enter this as a component to the library, it should be easy auto use and resize for the rest of the team. Any ideas or experienced tips on this are appreciated. Thanks