Skip to content
This repository was archived by the owner on Nov 9, 2024. It is now read-only.
This repository was archived by the owner on Nov 9, 2024. It is now read-only.

Issue with className prop passing with Styled Components  #68

@jamesmosier

Description

@jamesmosier

Thanks for a great project! Is there any insight into this warning I receive from styled-components when using it with Tippy React?

It looks like you've wrapped styled() around your React component (Popover), but the className prop is not being passed down to a child. No styles will be rendered unless className is composed within your React component.

Here is a codesandbox with the warning. Oddly enough, the example works as expected. I am wrapping the <Tippy /> component in a styled-component and that in turn styles the .tippy-tooltip element.

The warning is due to the fact I am passing in a custom component for content but my custom component is not receiving the props from styled-components (but I don't need it to).

For now I'm just passing suppressClassNameWarning into StyledPopover (in my example).

Any thoughts would be great! Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions