Expose disabled
prop for Tooltip, so we can conditionally render it
#13052
Labels
disabled
prop for Tooltip, so we can conditionally render it
#13052
Summary
There's two ways maybe I see this going
Via the
content
(prefered)If
content
isnull
then it will skip rendering the Tooltip and will only render the children.Via new prop
disabled
If
disabled
is true then it will skip rendering the Tooltip and will only render the childrenRationale
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.
The text was updated successfully, but these errors were encountered: