Open devyanshyadav opened 3 months ago
The ITooltipController
interface in the TooltipControllerTypes.d.ts
file has been enhanced to provide greater flexibility in content rendering. The content
and html
properties can now accept either a string or JSX element, and the function signature for render
has been updated accordingly. This allows for more dynamic and rich tooltip content.
Files | Change Summary |
---|---|
src/components/TooltipController/TooltipControllerTypes.d.ts |
Updated ITooltipController interface: content and html properties can now be string or JSX element; updated render function signature |
silently ignored due to the simple nature of changes
🐰 Beneath the code, in Tooltip's delight,
Content and HTML now shine more bright.
Either string or JSX, they flex with grace,
Tooltip anew, in every space.
Render now refines the scene,
As elements blend where once strings had been.
🖱️✨
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?
I'll have to check if this doesn't break anything (we might assume content
is always a string
somewhere), but at first glance it technically doesn't add anything new to the tooltip (just some convenience, I guess), since you can already pass JSX
as children to the tooltip, or with the render
prop. For instance:
<Tooltip>
<MyTooltipContent />
</Tooltip>
We're already doing some planning for V6 of the tooltip, so we might integrate this, or just drop the content
prop entirely in favor of children
, so there's less redundancy in existing features (html
is already deprecated).
Not sure yet what we'll do, but thanks for the suggestion!
This pull request is stale because it has not seen activity in 30 days. Remove the stale
label or comment within 14 days, or it will be closed.
Allow JSX.Element in tooltip content and html props
Summary by CodeRabbit