Skip to content

Plugin Not Working with Different Styled Component Syntax #96

@benpaullamb

Description

@benpaullamb

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions