question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support css<Props>`` like element<Props>``

See original GitHub issue

The styled-components css tag passes props through from the parent element, so something like:

interface Props {
  //...
}
const baseHeadingStyles = css<Props>`
  //...
`;

is perfectly valid. This doesn’t get recognized by the extension though.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
mjbvzcommented, Jan 27, 2020

What isn’t working? The highlighting?

Screen Shot 2020-01-27 at 11 51 27 AM

This plugin doesn’t provide the highlighting. That comes from https://marketplace.visualstudio.com/items?itemName=jpoissonnier.vscode-styled-components

0reactions
iansan5653commented, Jan 27, 2020

Yeah this is about the highlighting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support css<Props> like element<Props> #206 - GitHub
Support css<Props > like element<Props> #206 ... The styled-components css tag passes props through from the parent element, so something like:.
Read more >
Typescript React: Access component property types
The question is how do I access that information from the component class itself without explicitly exporting/importing the type for props? I ...
Read more >
API Reference - styled-components
The css prop is a convenient way to iterate on your components without settling on fixed component boundaries yet. It works on both...
Read more >
Documentation - JSX - TypeScript
TypeScript supports embedding, type checking, and compiling JSX directly to JavaScript. ... For React, intrinsic elements are emitted as strings ( React.
Read more >
How to Overload TypeScript React Component Interfaces by ...
This article explains how to create correct, intuitive APIs for React components in TypeScript by using prop values to overload React components.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found