Closed dan-dr closed 5 years ago
Sorry, I'm a little confused by your question. Why not use line comments when variables exist? Pressing Ctrl + /
in my editor gives the correct behavior:
const StyledComponent = styled.div`
${'' /* font-family: ${myAwesomeVariable}; */}
text-align: center;
`;
Commenting in styled-components with
Ctrl + /
yields:instead of
same for Alt + Shift + A for multiline comments
Now there's an issue when trying to use variables:
the above will give a compilation error of something like
Property value expected type of string but got null
so only${'' /* background: ${Colors.offBlack}; */}
will work.Maybe there's a way to identify when it's using variables in the tagged variables and choose which type of comment to put?