-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Milestone
Description
emotion
version: 10.0.6react
version: 16.8.0-alpha.1
Relevant code:
<span
css={theme => ({
fontWeight: theme.font.weight.light,
position: "absolute",
right: "8px",
top: "52%"
})}
>
What you did:
Created a theme using using the emotion-theming
package
What happened:
No typescript support for the provided theme object.
Reproduction:
Problem description:
From the documentation, it appears the current typescript support allows you to define the theme object shape when using styled()
, but not when using the css prop. Currently (and as confirmed by the documentation), the object is typed as any
.
Suggested solution:
Not sure if possible, but hopefully provide some way of defining a theme type via typescript generics, even when using the css prop. It appears the type is hardcoded for the css prop to any
here
christoph-fricke, shanecav, kenny-f, andykenward, BitPhinix and 16 more