Open benpaullamb opened 1 year ago
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
.c0
Works
const PageCount = styled.div` ${tw`inline-flex justify-center items-center`}; `;
Example output: .c1.c1
.c1.c1
Any ideas? Thank you!
This is intentional
https://github.com/QuickBase/babel-plugin-styled-components-css-namespace/blob/22260001b8f85305370ddd435a4c26f7d52e99dc/src/visitors/cssNamespace.js#L41
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
Example output:
.c0
Works
Example output:
.c1.c1
Any ideas? Thank you!