Closed nareshpingale closed 2 months ago
The recent changes introduce a new optional prop, disableTooltip
, that allows developers to conditionally disable tooltips for specific anchors. This enhancement improves flexibility and control over tooltip visibility across various components, including the Tooltip
, TooltipController
, and their respective TypeScript interfaces, ensuring seamless integration within the existing codebase.
Files | Change Summary |
---|---|
src/components/Tooltip/Tooltip.tsx , |
Added disableTooltip prop to the Tooltip component for conditional tooltip disabling based on anchor logic. |
src/components/TooltipTypes.d.ts |
Introduced disableTooltip method in ITooltip interface for controlling tooltip display behavior per anchor. |
src/components/TooltipController/TooltipController.tsx , |
Added disableTooltip prop to TooltipController , impacting tooltip rendering according to this new functionality. |
src/components/TooltipControllerTypes.d.ts |
Added disableTooltip method to ITooltipController interface for managing tooltip visibility based on anchor state. |
docs/docs/options.mdx |
Documented the new disableTooltip function, detailing its use for controlling tooltip visibility per anchor. |
src/test/tooltip-props.spec.js |
Added tests for disableTooltip prop behavior in TooltipProps , validating rendering logic based on its return value. |
π In the garden where tooltips play,
A new prop hops in to brighten the day!
"Disable me," it cheerfully sings,
Allowing more joy to the tooltip flings.
With anchors that dance and twirl with grace,
Conditional whispers now take their place!
πΈβ¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@gabrieljablonski do let me know if we need to update /examples for this. Also if everything looks fine at first glance will start adding changes to /docs.
Addresse #1210
Usage:
https://github.com/user-attachments/assets/932b76f2-8733-465a-bf02-8970da36435c
Summary by CodeRabbit
New Features
disableTooltip
for the Tooltip component, allowing developers to conditionally disable tooltips for specific anchors.disableTooltip
functionality, improving control over tooltip display behavior.Documentation
disableTooltip
function, providing guidance on controlling tooltip visibility based on anchor states.Tests
disableTooltip
prop, ensuring tooltips render correctly based on the prop's return value.