Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose disabled prop for Tooltip, so we can conditionally render it #13052

Open
muchisx opened this issue Jan 16, 2025 · 1 comment · May be fixed by #13139
Open

Expose disabled prop for Tooltip, so we can conditionally render it #13052

muchisx opened this issue Jan 16, 2025 · 1 comment · May be fixed by #13139

Comments

@muchisx
Copy link

muchisx commented Jan 16, 2025

Summary

There's two ways maybe I see this going

  1. Via the content (prefered)
    If content is null then it will skip rendering the Tooltip and will only render the children.

  2. Via new prop disabled
    If disabled 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.

@MichaScant MichaScant linked a pull request Jan 29, 2025 that will close this issue
6 tasks
@MichaScant
Copy link

MichaScant commented Jan 29, 2025

Hello, I opened a pull request for this issue: #13139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants