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>
}
}
@types/styled-componentpackage and had problems.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:
See
https://github.com/emotion-js/emotion/blob/1b7333a837813949fa4fe301bb0d53887e784b8b/packages/core/types/index.d.ts#L83