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

Plugin Not Working with Different Styled Component Syntax #96

Open
benpaullamb opened this issue Oct 24, 2023 · 1 comment
Open

Plugin Not Working with Different Styled Component Syntax #96

benpaullamb opened this issue Oct 24, 2023 · 1 comment

Comments

@benpaullamb
Copy link

benpaullamb commented Oct 24, 2023

Hi, I've got an issue with some components in a component library. The class names don't get doubled by this plugin when using the following Styled Components syntax:

Doesn't work

const ArrowButton = styled.button<ArrowButtonProps>(({ disabled = false }) => [
  tw`text-white`,
  disabled ? tw`bg-gray-50` : tw`hover:bg-secondary-700`
]);

Example output: .c0

Works

const PageCount = styled.div`
  ${tw`inline-flex justify-center items-center`};
`;

Example output: .c1.c1

Any ideas? Thank you!

@snitin315
Copy link

This is intentional

// Ignore templates tagged with anything other than `styled(x)`

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