react-tippy icon indicating copy to clipboard operation
react-tippy copied to clipboard

How to use styled components with react-tippy

Open net-bet opened this issue 4 years ago • 2 comments

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 } //...... //...;

net-bet avatar Aug 10 '20 14:08 net-bet

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

haneenmahd avatar Feb 02 '21 06:02 haneenmahd

For this to work Tooltip should be able to accept a className and apply it to the top level element it's rendering.

erikiva avatar Aug 26 '21 11:08 erikiva