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

Add Tooltip bgColor prop for content and arrow slots #120

Merged
merged 5 commits into from
Sep 21, 2023

Conversation

Twonarly1
Copy link
Contributor

Description

Task link: https://trello.com/c/w8KpyFoS/206-allow-customizing-tooltip-content-container-eg-background-color

Added bgColor prop type.

Test Steps

  1. Test bgColor with semantic colors (accent.default) and other base panda colors (red, orange.500, etc).

@changeset-bot
Copy link

changeset-bot bot commented Sep 21, 2023

🦋 Changeset detected

Latest commit: 417d8a6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@animareflection/ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview Sep 21, 2023 5:23pm

@@ -17,6 +17,7 @@ import type { ReactNode } from "react";
export interface Props extends TooltipProps {
trigger: ReactNode;
content: ReactNode;
bgColor?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

The bgColor type should be JsxStyleProps["bgColor"] I believe. AFK right now, but the JsxStyleProps should be imported from generated/panda/jsx iirc. Will test everything when I have the chance in a bit on my laptop!

"@animareflection/ui": patch
---

Added `Tooltip` color prop for content and arrow slots
Copy link
Contributor

Choose a reason for hiding this comment

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

Change to bgColor prop, as color prop is something different

@Twonarly1
Copy link
Contributor Author

Simply adding a bgColor prop to both arrow and arrowTip worked for some use cases, but not others. For example "accent.default, green, red, blue" worked but "accent.muted, yellow, orange" did not update the arrow properly. I am not sure why that was happening, but I had to remove the arrow bg in the recipe and add rotations as a workaround.

@hobbescodes hobbescodes changed the title Add Tooltip color prop for content and arrow slots Add Tooltip bgColor prop for content and arrow slots Sep 21, 2023
Copy link
Contributor

@hobbescodes hobbescodes left a comment

Choose a reason for hiding this comment

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

Lgtm! Tested it out in storybook and in downstream example app!

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

Successfully merging this pull request may close these issues.

2 participants