- Updated dependencies [
0b7ebdf
,0b7ebdf
]:- babel-plugin-emotion@11.0.0-next.8
- @emotion/core@11.0.0-next.8
- Updated dependencies [
5c55fd17
,729ef9d8
]:- @emotion/core@11.0.0-next.7
- @emotion/serialize@0.11.15-next.2
923ded01
#1600 Thanks @JakeGinnivan! - Relaxed types forshouldForwardProp
as it needs to be able to filter props for a generic argument of the resulting function.- Updated dependencies [
923ded01
,0a4a22ff
,828111cd
,843bfb11
,828111cd
,cbb8b796
]:- @emotion/is-prop-valid@0.9.0-next.1
- babel-plugin-emotion@11.0.0-next.6
- @emotion/core@11.0.0-next.6
-
ad77ed24
#1600 Thanks @JakeGinnivan! - AddedCreateStyled
overload to handle whenshouldForwardProp
is a custom type guard for intrinsic props.As an example, if you want to override the type of the
color
prop:export const Box = styled('div', { shouldForwardProp: ( propName ): propName is Exclude<keyof JSX.IntrinsicElements['div'], 'color'> => propName !== 'color' })<{ color: Array<string> }>(props => ({ color: props.color[0] })) ;<Box color={['green']} />
99c6b7e2
#1600 Thanks @JakeGinnivan! - Fix issue with one of TypeScript overloads forstyled
. It passStyleProps
toInterpolation
correctly now.- Updated dependencies []:
- @emotion/core@11.0.0-next.5
e6e079c3
#1600 Thanks @frankwallis! - Fix for TypeScript error when importing@emotion/styled/base
in combination withisolatedModules
option.- Updated dependencies [
c65c5d88
]:- babel-plugin-emotion@11.0.0-next.4
- @emotion/core@11.0.0-next.4
f9feab1a
#1575 Thanks @mitchellhamilton! - Removed support for@emotion/styled-base
package. It has been moved to@emotion/styled
and is available as@emotion/styled/base
. This simplifies how the regular and base versions relate to each other and eliminates problems with stricter package managers when@emotion/styled-base
was not installed explicitly by a user.
- Updated dependencies [
8a896a31
,c5b12d90
,c5b12d90
,a085003d
,f9feab1a
,c5b12d90
]:- @emotion/serialize@0.11.15-next.1
- babel-plugin-emotion@11.0.0-next.3
- @emotion/core@11.0.0-next.3
- @emotion/is-prop-valid@0.8.6-next.0
79036056
#967 Thanks @mitchellhamilton! - Remove support for deprecatedinnerRef
prop
79036056
#967 Thanks @mitchellhamilton! - Use hooks internally for improved bundle size and a better tree in React DevTools
- Updated dependencies [
79036056
,79036056
]:- @emotion/styled-base@11.0.0-next.2
- @emotion/core@11.0.0-next.2
-
1eaa3a38
#1600 Thanks @mitchellhamilton! - TypeScript types have been restructured. These changes:- Reduce build times when using emotion
- In many cases remove the need for manually specifying generic parameters for your emotion components.
If you encounter build issues after upgrade, try removing any manually specified generic types and let them be inferred. Otherwise refer to the breaking changes list below.
- useTheme added to EmotionTheming interface and can now create your own closed variation of withTheme. More information in the docs under the theming section.
- Union types as props are better supported and should be inferred properly
- Build times should be reduced significantly in larger projects.
-
withTheme can now have the Theme type specified when calling it. For example
withTheme<MyTheme>(MyComponent)
Breaking change: Generic argument changed, if you were specifying the ComponentType you will need to remove the generic parameter. Recommend following example setup in the TypeScript docs under theming section
-
css
function has been restricted to prevent passing of invalid types -
CreateStyled
functions no longer take a secondExtraProps
argument. Instead move it to after the create styled call. For examplestyled<typeof MyComponent, ExtraProps>(MyComponent)({})
tostyled(MyComponent)<ExtraProps>({})
-
StyledComponent
type no longer supports the third genericTheme
parameter. Instead add thetheme
prop to the firstProps
argument. For example:StyledComponent<Props, {}, MyTheme>
toStyledComponent<Props & { theme?: MyTheme }>
22935470
#1588 Thanks @FezVrasta! - StyledComponent Flow type is now polymorphic, that means you can now define the component prop types to get better type safety.- Updated dependencies [
1eaa3a38
,22935470
]:- @emotion/styled-base@11.0.0-next.1
- babel-plugin-emotion@11.0.0-next.1
- @emotion/core@11.0.0-next.1
302bdba1
#1600 Thanks @mitchellhamilton! - Ensure packages are major bumped so that pre-release versions of the linked packages are consistent in the major number
- Updated dependencies [
b0ad4f0c
,302bdba1
]:- babel-plugin-emotion@11.0.0-next.0
- @emotion/core@11.0.0-next.0
- @emotion/styled-base@11.0.0-next.0
-
97673098
#1570 Thanks @FezVrasta! - Fixed package's Flow types -
Updated dependencies [
3927293d
,97673098
,b3a0f148
]:- babel-plugin-emotion@10.0.23
- @emotion/styled-base@10.0.23
10211951
#1553 Thanks @Andarist! - Add dev warning about keyframes being interpolated into plain strings.
57a767ea
#1560 Thanks @Andarist! - Fix composition of styles without a final semicolon in a declaration block
c3f0bc10
#1545 Thanks @jgroszko! - Accept objects asclassName
in styled components (they are stringified) to match React behavior
-
11bea3a8
#1562 Thanks @FezVrasta! - Export Flow type definitions for @emotion/styled/macro and @emotion/css/macro -
Updated dependencies [
4fc5657a
,2fc75f26
,10211951
,57a767ea
,1bb3efe3
,c3f0bc10
]:- @emotion/core@10.0.22
- @emotion/styled-base@10.0.22
- babel-plugin-emotion@10.0.22
- 8638c416 #1421 Thanks @Andarist! - TS: Disallow Theme parameter when it was already parametrized by using CustomStyled
- c0eb604d #1419 Thanks @mitchellhamilton! - Update build tool
- f7238e7e #1364 Thanks @arcanis! - Adds @emotion/core & react to the peer dependencies
- b849f66c #1369 Thanks @SavePointSam! - Exposed macro.d.ts
- 595aa85 #1315 Thanks @lifeiscontent! - Add macro.d.ts for @emotion/styled