Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't transform styled components with config #528

Open
vladislaver opened this issue Oct 28, 2021 · 1 comment
Open

Doesn't transform styled components with config #528

vladislaver opened this issue Oct 28, 2021 · 1 comment

Comments

@vladislaver
Copy link

StyledComponentsTransformer ignores styled components with config like this:

const Box = styled.div.withConfig<Props>({
    shouldForwardProp: (prop, defaultValidatorFn) =>
        !['display'].includes(prop) && defaultValidatorFn(prop),
})`
    display: ${prop => prop.display};
`;

[email protected]
[email protected]
[email protected]

@Igorbek
Copy link
Owner

Igorbek commented Nov 4, 2021

Hm, it's not supported because withConfig was not part of the public surface.
I guess it was changed some time ago. I would argue if you use useConfig manually it should opt out of display name generation. I will need to investigate how well it would be working with multiple useConfig.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants