anyone got any experience using react-tooltip
with styled-components
?
I tried to wrap my tooltip inside a styled component but they styles weren't fully showing
I wanted a yellow background but got a yellow background with a massive black border
I also want to place the tooltip directly over the top of where I hover, can anyone show me how to do this if possible?
code:
<div>
<ReactTooltip className="extraClass" effect="solid">
{'I shall be the text and this is where I will go'}
</ReactTooltip>
</div>
how do I add the extraClass if im using styled-comps?
This answer is maybe not by the book but I also did not manage to find a way to style at proper way using styled components.
This is my working example.
You just need to import newly styledthe component in your React file and use it instead of original ReactTooltip component.
One way would be
As you haven't shared the code,here is the stateless component with
react-tooltip
EDIT Here is the working code: