Releases: styled-components/styled-components
v6.0.0-alpha.5
- Fix types associated with
styled-components/macros
- Add optional peer dependency for
babel-plugin-styled-components
(required for macros)
Updated sandbox for alpha: https://codesandbox.io/s/styled-components-v6-alpha-sandbox-05bod1?file=/src/App.tsx
Full Changelog: v6.0.0-alpha.4...v6.0.0-alpha.5
v6.0.0-alpha.4
- 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
v6.0.0-alpha.2
Added "types" package.json fields for TS type acquistion.
Full Changelog: v6.0.0-alpha.1...v6.0.0-alpha.2
v5.3.5
v6.0.0-alpha.1
Fixed the TS declarations not getting emitted correctly by rollup.
Full Changelog: .v6.0.0-alpha.0...v6.0.0-alpha.1
v6.0.0-alpha.0
After an epic amount of refactoring, I'm pleased to announce the first alpha of styled-components v6!
Highlights:
- styled-components is now written in TypeScript and ships its own types
- stylis v4
- tons of bug fixes
- node 14+ now required
Full Changelog: v5.2.0...v6.0.0-alpha.0
v5.3.3
What's Changed
- Backport #3568 (read from textContent rather than innerHTML during rehydrate) to v5 by @keeganstreet in #3591
- [v5] generate more complete sourcemaps by @henryqdineen in #3597
New Contributors
- @henryqdineen made their first contribution in #3597
Full Changelog: v5.3.1...v5.3.3
v5.3.1
-
Fix forced server-side mode not triggering global styles (See #3566)
-
Fix SSR collisions caused by insufficient hash inputs and reordering of groups on the client, which is a regression in v5.2.0 (See #3563)
-
Fix dynamic creation React warning for React v18, backported to v5 by @lynndylanhurley (See #3564)
-
Add missing typeof window check when checking for duplicate instances of styled-components (See #3553)
-
Prevent ServerStyleSheet from emitting empty style tags, which would cause issues in IE11 (See #3555)
-
Support css tagged templates inside style objects, by @roginfarrer and @dvingo (See #3469)