- Added type for
CSSProp
(this is in definitely typed but wasn't exposed by us) - Exposed more base types
Recommended styled-components.d.ts
setup for your project:
// create styled-components.d.ts in your project source
// if it isn't being picked up, check tsconfig compilerOptions.types
import type { CSSProp } from 'styled-components';
import Theme from './theme';
type ThemeType = typeof Theme;
declare module 'styled-components' {
export interface DefaultTheme extends ThemeType {}
}
declare module 'react' {
interface DOMAttributes<T> {
css?: CSSProp;
}
}
Full Changelog: v6.0.0-alpha.2...v6.0.0-alpha.4