Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] - highlighting for styled component function signatures #54

Open
pr1ntr opened this issue Aug 7, 2018 · 2 comments
Open

[Feature] - highlighting for styled component function signatures #54

pr1ntr opened this issue Aug 7, 2018 · 2 comments

Comments

@pr1ntr
Copy link

pr1ntr commented Aug 7, 2018

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

@VitalyKrenel
Copy link

@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.

@pr1ntr
Copy link
Author

pr1ntr commented Jun 19, 2019

I discovered this recently. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants