compiled
compiled copied to clipboard
Commented expression still being applied
When commenting an independent condition expression, styles are still applied
const Component = styled.div`
/*${({ isRed }) => isRed ? 'color: red' : 'color: green'};*/
`;
// Outputs
const _2 = "._syazbf54{color:green}";
const _ = "._syaz5scu{color:red}";
const Component = forwardRef(
({ as: C = "fieldset", style, isRed, ...props }, ref) => (
<CC>
<CS>{[_, _2]}</CS>
<C
{...props}
style={style}
ref={ref}
className={ax(["", isRed ? "_syaz5scu" : "_syazbf54", props.className])}
/>
</CC>
)
);
However using these commented expressions are fine
const Component = styled.div`
/*color: ${({ isRed }) => isRed ? 'red' : 'green'};*/
/*${inline};*/
`;