react-tippy
react-tippy copied to clipboard
How to use styled components with react-tippy
Hi, I wrapped my tooltip with a styled element, but the styled not applies. I guess it is related to something with the positioning of the elements. How can I use styled components or inline styling here?
Thanks.
const StyledTooltip = styled(Tooltip).tippy-touch { cursor: pointer!important } //...... //...
;
Unfortunately, You cannot wrap a The Tooltip Inside a div or other elements. But, You could add elements inside the Tooltip. Code <Tooltip html={( <StyledElem> </StyledElem> )}
// ... </Tooltip>
That's What i know from my Experience
For this to work Tooltip should be able to accept a className and apply it to the top level element it's rendering.