This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
add disabled as prop to support visibilty modes of tooltip #300
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
this change is needed to prevent situations like this -
![image](https://private-user-images.githubusercontent.com/38322603/256530687-793a88e8-b4bf-4a27-a0aa-a6d62f4ec670.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MjM1MzUsIm5iZiI6MTczOTUyMzIzNSwicGF0aCI6Ii8zODMyMjYwMy8yNTY1MzA2ODctNzkzYTg4ZTgtYjRiZi00YTI3LWEwYWEtYTZkNjJmNGVjNjcwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDA4NTM1NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJkNWNkOTdiOWZmOTlmOTE1NWUwZjBhOTNjMGI1MTBlYmQ3MTNmZDVlN2ZmMGU5OTQ3ZTNlMjY5ZDQxMjE5NTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.W7ZlKK6i8NMfaslRvYuEHU8mMas3pyuVkrP7eBXCnCA)
we would like to hide the tooltip when the popover is open (the tooltip wraps the button the is wrapped by the popover)
Support the ability to disable/enable tooltip (control visibility).
similar to bootstrap's tooltip disable prop -> https://getbootstrap.com/docs/4.0/components/tooltips/#tooltipdisable
Screenshots & Recordings
Screen-Recording-2023-07-27-at-3.07.36-PM.mp4
How it does that
Added the 'disabled' prop (default value is false) that effects the Tip's style (visibility: visible/hidden)
In addition I edited the Active story to reflect better what exactly it does.
Screen-Recording-2023-07-27-at-3.11.25-PM.mp4
Tests
Add unit tests to the component on file Tip.test.tsx