-
Notifications
You must be signed in to change notification settings - Fork 30.6k
Open
Description
- I tried using the
@types/styled-componentpackage and had problems. - I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript
- I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).
- Mention the authors (see
Definitions by:inindex.d.ts) so they can respond.
I tried using the new css prop (https://medium.com/styled-components/announcing-native-support-for-the-css-prop-in-styled-components-245ca5252feb) with the babel typescript presets and the styled-component babel-plugin.
This runs fine but type-checking fails because type definition does not extend builtin components (div, button...) with the 'css' prop.
Note that a similar prop seems to be supported in emotionjs type definitions by globally extending the react module:
declare module 'react' {
interface DOMAttributes<T> {
css?: InterpolationWithTheme<any>
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels