pm-idm
pm-idm copied to clipboard
Improve TooltipTrigger's implementation
Description
With its current implementation, the tooltip trigger requires that the trigger element be a class component, so as to pass it a reference. This should not be the case as the implementation of an element should not depend on whether it will be used as a tooltip trigger or not.
Acceptance Criteria
- [ ] The TooltipTrigger can accept functional components as triggers.
I think it doesn't necessarily requires it to be a class component, but rather a component that supports refs (functional components can forward refs).
Neverthless, I agree. I have a similar issue on discussify as well: https://github.com/ipfs-shipyard/pm-discussify/issues/47
I did not notice that issue on discussify, thanks for linking it here.