Skip to content

Latest commit

Β 

History

History
205 lines (128 loc) Β· 13 KB

CHANGELOG.md

File metadata and controls

205 lines (128 loc) Β· 13 KB

@emotion/styled

11.0.0-next.8

Patch Changes

  • Updated dependencies [0b7ebdf, 0b7ebdf]:
    • babel-plugin-emotion@11.0.0-next.8
    • @emotion/core@11.0.0-next.8

11.0.0-next.7

Patch Changes

  • Updated dependencies [5c55fd17, 729ef9d8]:
    • @emotion/core@11.0.0-next.7
    • @emotion/serialize@0.11.15-next.2

11.0.0-next.6

Patch Changes

11.0.0-next.5

Minor Changes

  • ad77ed24 #1600 Thanks @JakeGinnivan! - Added CreateStyled overload to handle when shouldForwardProp 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']} />

Patch Changes

  • 99c6b7e2 #1600 Thanks @JakeGinnivan! - Fix issue with one of TypeScript overloads for styled. It pass StyleProps to Interpolation correctly now.
  • Updated dependencies []:
    • @emotion/core@11.0.0-next.5

11.0.0-next.4

Patch Changes

  • e6e079c3 #1600 Thanks @frankwallis! - Fix for TypeScript error when importing @emotion/styled/base in combination with isolatedModules option.
  • Updated dependencies [c65c5d88]:
    • babel-plugin-emotion@11.0.0-next.4
    • @emotion/core@11.0.0-next.4

11.0.0-next.3

Major Changes

  • 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.

Patch Changes

11.0.0-next.2

Major Changes

Patch Changes

  • Updated dependencies [79036056, 79036056]:
    • @emotion/styled-base@11.0.0-next.2
    • @emotion/core@11.0.0-next.2

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 types

    • CreateStyled functions no longer take a second ExtraProps argument. Instead move it to after the create styled call. For example

      styled<typeof MyComponent, ExtraProps>(MyComponent)({}) to styled(MyComponent)<ExtraProps>({})

    • StyledComponent type no longer supports the third generic Theme parameter. Instead add the theme prop to the first Props argument. For example:

      StyledComponent<Props, {}, MyTheme> to StyledComponent<Props & { theme?: MyTheme }>

Patch Changes

  • 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

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 [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

10.0.23

Patch Changes

10.0.22

Patch Changes

  • 57a767ea #1560 Thanks @Andarist! - Fix composition of styles without a final semicolon in a declaration block
  • c3f0bc10 #1545 Thanks @jgroszko! - Accept objects as className in styled components (they are stringified) to match React behavior

10.0.17

Patch Changes

10.0.15

Patch Changes

  • 8638c416 #1421 Thanks @Andarist! - TS: Disallow Theme parameter when it was already parametrized by using CustomStyled

10.0.14

Patch Changes

10.0.12

Patch Changes

10.0.11

Patch Changes