emotion-theming
11.0.0
Major Changes
cbb8b796
#1628 Thanks @Andarist! -emotion-theming
has been removed and all its exports were moved to@emotion/react
package. Please import them like thisimport { useTheme, ThemeProvider, withTheme } from '@emotion/react'
from now on.
11.0.0-rc.0
Major Changes
11.0.0-next.6
Major Changes
cbb8b796
#1600 Thanks @Andarist! -emotion-theming
has been removed and all its exports were moved to@emotion/core
package. Please import them like thisimport { useTheme, ThemeProvider, withTheme } from '@emotion/core'
from now on.
11.0.0-next.5
Patch Changes
11.0.0-next.4
Patch Changes
- Updated dependencies [
e6e079c3
]:
11.0.0-next.3
Patch Changes
11.0.0-next.2
Major Changes
79036056
#967 Thanks @mitchellhamilton! - Use hooks internally for improved bundle size and a better tree in React DevTools
Patch Changes
11.0.0-next.1
Major Changes
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.
Improvements
- 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.
Breaking changes
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 typesCreateStyled
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 }>
Patch Changes
11.0.0-next.0
Major Changes
302bdba1
#1600 Thanks @mitchellhamilton! - Ensure packages are major bumped so that pre-release versions of the linked packages are consistent in the major number
Patch Changes
- Updated dependencies [
302bdba1
]:
10.0.27
Patch Changes
10.0.19
Patch Changes
ffc7c58c #1509 Thanks @XeeD! - Add TypeScript type definition for the useTheme hook in emotion-theming
Updated dependencies [c81c0033]:
10.0.18
Patch Changes
10.0.17
Patch Changes
10.0.14
Patch Changes
- c0eb604d #1419 Thanks @mitchellhamilton! - Update build tool