Open
Description
Summary
There's two ways maybe I see this going
-
Via the
content
(prefered)
Ifcontent
isnull
then it will skip rendering the Tooltip and will only render the children. -
Via new prop
disabled
Ifdisabled
is true then it will skip rendering the Tooltip and will only render the children
Rationale
Sometimes a tooltip is conditional to the state of the element is wrapping, or something else in the page.
A lot of times we want to add tooltips to disabled buttons to explain why they are disabled.
This becomes cumbersome as we need to do a ConditionalWrapper component that handles the rendering of the tooltip.