When trying to run this typescript example from documentation, I get many typescript errors
https://emotion.sh/docs/typescript#passing-props-when-styling-a-react-component
emotion version: 9.1.3react version: 16.4.0typescript version: 2.8.3What you did:
Tried to run this example
What happened:
Got many typescript errors




Ok, figured out the correct way
import * as React from 'react'
import styled from 'react-emotion'
type ComponentProps = {
className?: string,
label: string
}
type StyledComponentProps = {
bgColor: string
}
const Component: React.SFC<ComponentProps> = ({ label, className }) => (
<div className={className}>{label}</div>
)
const StyledComponent = styled<ComponentProps, StyledComponentProps>(Component)`
color: red;
background: ${props => props.bgColor};
`
const App = () => (
<StyledComponent bgColor="red" label="Oh, needs to re-type label prop =(" />
)
Close this issue in favor of #679.
Most helpful comment
Ok, figured out the correct way