pm-idm icon indicating copy to clipboard operation
pm-idm copied to clipboard

Improve TooltipTrigger's implementation

Open dominguesgm opened this issue 6 years ago • 2 comments

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.

dominguesgm avatar Mar 11 '19 11:03 dominguesgm

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

satazor avatar Mar 11 '19 22:03 satazor

I did not notice that issue on discussify, thanks for linking it here.

dominguesgm avatar Mar 14 '19 10:03 dominguesgm