Replies: 1 comment
|
Target HeroUI's nested <Tooltip>
<Button>Top</Button>
<Tooltip.Content
showArrow
placement="top"
className="[&_[data-slot=overlay-arrow]]:fill-red-400 [&_[data-slot=overlay-arrow]]:stroke-red-500"
>
<Tooltip.Arrow />
<p>Top placement</p>
</Tooltip.Content>
</Tooltip>If your Tailwind setup does not emit those arbitrary descendant variants, the equivalent CSS is: .my-tooltip [data-slot="overlay-arrow"] {
fill: var(--color-red-400);
stroke: var(--color-red-500);
}<Tooltip.Content className="my-tooltip" showArrow placement="top">
<Tooltip.Arrow />
<p>Top placement</p>
</Tooltip.Content>HeroUI's source renders the default arrow as an SVG with that data slot, and its component CSS normally applies |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I'm trying to figure out how to colorize the arrow of a Tooltip (Tooltip.Arrow).
I tried to use the background color but it doesn't do what I expected ?
Thank you for the help !
All reactions