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

[ic-tooltip]: add prop to disable tooltip from appearing #2844

Open
jd239 opened this issue Nov 29, 2024 · 0 comments
Open

[ic-tooltip]: add prop to disable tooltip from appearing #2844

jd239 opened this issue Nov 29, 2024 · 0 comments

Comments

@jd239
Copy link
Contributor

jd239 commented Nov 29, 2024

Summary

Add a prop which will allow the consumer to disable all tooltip functionality.

💬 Description

At the moment, it is not possible to disable all functionality of the tooltip. Where this feature would be useful is if the tooltip is used to display truncated text. If the text is shown in full and no longer truncated, the consumer must strip the text from the body of the tooltip component, remove/delete the tooltip element and re-apply the content as a child to the wrapper.

It would be easier to provide a prop which will prevent the tooltip from appearing as well as prevent it from being read out by screen readers.

💰 User value

This would improve the implementation for enabling and disabling the tooltip.

📚 User Stories

If relevant, describe the high-level functionality as user stories.

*As a developer:
I need be able to disable the tooltip functionality
So that I do not need to strip out the contents and delete the tooltip when it is no longer required

📝 Acceptance Criteria

If relevant, describe in full detail the different interactions and edge cases that the component or patterns needs to fulfil.

Given that I have applied a tooltip to an element which doesn't need to be displayed
When I set the disabled(?) prop to true
Then the tooltip should not appear on hover or click

✏ Designs

If there's a Figma design file (or other mock-up), include it here.

## 🧾 Guidance
If there's written guidance or documentation, include a link to it here.

Additional info

There is already a disableClick prop which is internal. A suggestion is to add a disable prop which sets disableHover and disableClick to true.

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

No branches or pull requests

1 participant