npm styled-components 6.0.0-alpha.4
v6.0.0-alpha.4

latest releases: 6.1.14, 6.1.13, 6.1.12...
2 years ago
  • 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

Don't miss a new styled-components release

NewReleases is sending notifications on new releases.