Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

feat: enhance tooltip to accept a custom wrapper #359

Merged
merged 3 commits into from Dec 2, 2022

Conversation

georgesimos
Copy link
Contributor

Background

The tooltip component is a bit limited, so I introduced the content wrapper that will enhance the tooltip capability to modify the content container, e.g. background colour or adding an arrow!
Screenshot 2022-12-02 at 2 38 34 PM

Changes

  • Add a contentWrapper property
  • Keep the existing as a default

Testing

  • Testing locally

@georgesimos georgesimos requested a review from a team December 2, 2022 12:41
@georgesimos georgesimos self-assigned this Dec 2, 2022
Copy link
Contributor

@3nvi 3nvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@georgesimos It looks fine, but before I approve it, can we add a test around this new capability?

content: string | React.ReactElement;

/** The wrapper that contains the contnet */
contentWrapper?: React.ElementType;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional: I'd rename that to just wrapper

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Contributor

@kouknick kouknick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@georgesimos georgesimos merged commit 8f714cf into master Dec 2, 2022
@georgesimos georgesimos deleted the feat-add-content-wrapper-in-tooltip branch December 2, 2022 15:04
@panther-bot
Copy link

🎉 This PR is included in version 0.135.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants