-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
🦋 Changeset detectedLatest commit: 417d8a6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -17,6 +17,7 @@ import type { ReactNode } from "react"; | |||
export interface Props extends TooltipProps { | |||
trigger: ReactNode; | |||
content: ReactNode; | |||
bgColor?: string; |
There was a problem hiding this comment.
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!
.changeset/polite-colts-obey.md
Outdated
"@animareflection/ui": patch | ||
--- | ||
|
||
Added `Tooltip` color prop for content and arrow slots |
There was a problem hiding this comment.
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
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. |
Tooltip
color prop for content and arrow slotsTooltip
bgColor prop for content and arrow slots
There was a problem hiding this 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!
Description
Task link: https://trello.com/c/w8KpyFoS/206-allow-customizing-tooltip-content-container-eg-background-color
Added
bgColor
prop type.Test Steps