webstorm-styled-components
webstorm-styled-components copied to clipboard
[Feature] - highlighting for styled component function signatures
I was wondering if its possible to make IntelliJ recognize a styled component interpolator based on the function signature?
something like:
export const breakpoint = (gt = 'xs', lte) => (strings, ...interpolation) => css`
@media (min-width: ${grid[gt]}px) ${lte && grid[lte] ? `(max-width: ${grid[lte]})` : ''} {
${css(strings, ...interpolation)}
}
`
Since it returns css`` and has a signature of (strings, ...interpolation) maybe then the plugin will highlight it as a styled component. I can submit this a feature request too if you have a GitHub
#47
@pr1ntr do you know about this configuration feature https://github.com/styled-components/webstorm-styled-components/#configuration? It allows u to set up custom tag function names that will be recognized as CSS and thus highlighted.
I know that's not what you exatcly was asking, just for the case you have encountered a problem and needed any solution.
I discovered this recently. Thanks