e3d7db87
#1732 Thanks @Andarist! - An additional semicolon is now inserted after interpolated arrays to cover cases when it doesn't have a trailing semi itself and thus breaking composition with styles coming after it.
f08ef5a3
#1600 Thanks @Andarist! - Removed leftover@emotion/react
import from type definition file.
c643107
#1600 Thanks @joltmode! - Reworked Interpolation-related types. Correct types should now be provided to all flavours of emotion.
5c55fd17
#1600 Thanks @Andarist! - Fix to what location generated source maps are pointing in case of composed styles.
8a896a31
#1600 Thanks @Andarist! - Throw error about invalid content property values instead of just logging error to the console.
-
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 }>
- Updated dependencies [
446e756
]:- @emotion/hash@0.8.0
4c62ae9
#1698 Thanks @Andarist! - Add LICENSE file- Updated dependencies [
4c62ae9
]:- @emotion/hash@0.7.4
- @emotion/memoize@0.7.4
- @emotion/unitless@0.7.5
- @emotion/utils@0.11.3
a55f3d49
#1581 Thanks @Andarist! - Don't cause invalid rule to be serialized when using object style with falsy value
3b7e2f2e
Thanks @mitchellhamilton! - Fix flow errors
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
- Updated dependencies [c81c0033]:
- @emotion/hash@0.7.3
- @emotion/memoize@0.7.3
- c257d2a3 #1420 Thanks @Andarist! - Fix for opaque keyframes object being used as value for animation & animationName in object styles
- c0eb604d #1419 Thanks @mitchellhamilton! - Update build tool