I am attempting to embed an image/icon into my tooltip via the Chakra UI library. So that it is more that just the label showing, I want the MdWarningAmber Icon to show in the tooltip rather than next to the button to hover over
https://chakra-ui.com/docs/components/tooltip/usage
<Tooltip label=' Access to this page is exclusively available to registered users.'
className="tooltip"
aria-label="tooltip"
placement='right-end'
closeDelay={100}
bg={"white"}
textColor={"#8e8e8e"}>
<span>
<Icon as={MdWarningAmber} color={"#8e8e8e"} />
<Button>
Hover Over Me
</Button>
</span>
</Tooltip>
I have tried placing a with the Icon inside but that doesnt seem to help
2
Answers
Workaround is using the <Popover> element and adding
trigger="hover"
As the documentation mentions: