Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Commit fff507b

Browse files
stramelpedronauck
andauthored
chore: upgrade to emotion v11 (#1587)
Co-authored-by: Pedro Nauck <[email protected]>
1 parent f9bf964 commit fff507b

File tree

13 files changed

+187
-40
lines changed

13 files changed

+187
-40
lines changed

core/docz/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"precommit": "lint-staged"
2424
},
2525
"dependencies": {
26-
"@emotion/core": "^10.0.16",
26+
"@emotion/react": "^11.1.1",
2727
"@mdx-js/react": "^1.0.27",
2828
"array-sort": "^1.0.0",
2929
"capitalize": "^2.0.0",

core/gatsby-theme-docz/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ One of the coolest thing of Docz is that you can create your own theme if you wa
7777
```js
7878
import React from 'react'
7979
import { theme, useConfig, ComponentsProvider } from 'docz'
80-
import { ThemeProvider } from 'emotion-theming'
80+
import { ThemeProvider } from '@emotion/react'
8181
import baseComponents from 'gatsby-theme-docz/src/components'
8282

8383
import { Menu } from './MyBeautifulMenu'

core/gatsby-theme-docz/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@
1616
"precommit": "lint-staged"
1717
},
1818
"dependencies": {
19-
"@emotion/core": "^10.0.14",
20-
"@emotion/styled": "^10.0.14",
19+
"@emotion/react": "^11.1.1",
20+
"@emotion/styled": "^11.0.0",
2121
"@loadable/component": "^5.10.2",
2222
"@mdx-js/mdx": "^1.1.0",
2323
"@mdx-js/react": "^1.0.27",
2424
"@theme-ui/typography": "^0.2.5",
2525
"babel-plugin-export-metadata": "^2.3.0",
2626
"copy-text-to-clipboard": "^2.1.0",
27-
"emotion-theming": "^10.0.14",
2827
"fs-extra": "^8.1.0",
2928
"gatsby": "^2.13.27",
3029
"gatsby-plugin-alias-imports": "^1.0.5",

core/gatsby-theme-docz/src/components/Layout/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @jsx jsx */
22
import { useRef, useState } from 'react'
33
import { jsx, Layout as BaseLayout, Main } from 'theme-ui'
4-
import { Global } from '@emotion/core'
4+
import { Global } from '@emotion/react'
55

66
import global from '~theme/global'
77
import { Header } from '../Header'

core/gatsby-theme-docz/src/components/Sidebar/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/** @jsx jsx */
2-
import { Fragment, forwardRef, useState, useRef, useEffect } from 'react'
3-
import { Global } from '@emotion/core'
2+
/** @jsxFrag React.Fragment */
3+
import React, { forwardRef, useState, useRef, useEffect } from 'react'
4+
import { Global } from '@emotion/react'
45
import { jsx, Box } from 'theme-ui'
56
import { useMenus, useCurrentDoc } from 'docz'
67

examples/flow/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"build": "docz build"
1515
},
1616
"dependencies": {
17-
"@emotion/core": "^10.0.14",
18-
"@emotion/styled": "^10.0.14",
17+
"@emotion/react": "^11.1.1",
18+
"@emotion/styled": "^11.0.0",
1919
"docz": "latest",
2020
"prop-types": "^15.7.2",
2121
"react": "^16.8.6",

examples/images/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"build": "docz build"
1414
},
1515
"dependencies": {
16-
"@emotion/core": "^10.0.14",
17-
"@emotion/styled": "^10.0.14",
16+
"@emotion/react": "^11.1.1",
17+
"@emotion/styled": "^11.0.0",
1818
"docz": "latest",
1919
"prop-types": "^15.7.2",
2020
"react": "^16.8.6",

examples/logo-in-sidebar/src/gatsby-theme-docz/components/Sidebar/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/** @jsx jsx */
22
import { Fragment, forwardRef, useState, useRef, useEffect } from 'react'
3-
import { Global } from '@emotion/core'
4-
import { jsx, Box } from 'theme-ui'
5-
import { useMenus, useCurrentDoc } from 'docz'
3+
import { Global } from "@emotion/react";
4+
import { jsx, Box } from "theme-ui";
5+
import { useMenus, useCurrentDoc } from "docz";
66

77
import * as styles from 'gatsby-theme-docz/src/components/Sidebar/styles'
88
import { NavSearch } from 'gatsby-theme-docz/src/components/NavSearch'

examples/now/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"deploy": "npm run build && now"
1717
},
1818
"dependencies": {
19-
"@emotion/core": "^10.0.14",
20-
"@emotion/styled": "^10.0.14",
19+
"@emotion/react": "^11.1.1",
20+
"@emotion/styled": "^11.0.0",
2121
"docz": "latest",
2222
"prop-types": "^15.7.2",
2323
"react": "^16.8.6",

examples/typescript/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"build": "docz build"
1515
},
1616
"dependencies": {
17-
"@emotion/core": "^10.0.14",
18-
"@emotion/styled": "^10.0.14",
17+
"@emotion/react": "^11.1.1",
18+
"@emotion/styled": "^11.0.0",
1919
"docz": "latest",
2020
"react": "^16.8.6",
2121
"react-dom": "^16.8.6"

examples/with-algolia-search/src/docs/customizing/powered-by-gatsby.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Using Gatsby as bundler behind the scenes gives you a lot of benefits like :
2323

2424
## Gatsby API and Hooks
2525

26-
Gatsby has an extensive [API for developers](https://www.gatsbyjs.org/docs/api-reference/) and a lot of hooks and lifecycle methods that you can use in order to customize your build process.
26+
Gatsby has an extensive [API for developers](https://www.gatsbyjs.org/docs/api-reference/) and a lot of hooks and lifecycle methods that you can use in order to customize your build process.
2727

2828
You can hook into it in a lot of ways and all of these hooks and properties are available when you use docz.
2929

@@ -35,7 +35,7 @@ create it in the root and docz will do the rest.
3535
If you want to make some changes to your webpack configuration, you can use
3636
the `onCreateWebpackConfig` hook by exporting a function from the `gatsby-node.js` file.
3737

38-
For example to create aliases or change how your modules are resolved, you can do something like the below example :
38+
For example to create aliases or change how your modules are resolved, you can do something like the below example :
3939

4040
```js
4141
// gatsby-node.js
@@ -61,7 +61,7 @@ Or if you want to change your Babel configuration you can use the `onCreateBabel
6161
// gatsby-node.js
6262
exports.onCreateBabelConfig = ({ actions }) => {
6363
actions.setBabelPlugin({
64-
name: `babel-plugin-emotion`,
64+
name: `@emotion/babel-plugin`,
6565
options: {
6666
sourceMap: true,
6767
},

examples/with-algolia-search/src/docs/references/creating-plugins.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ A set of preconfigured webpack config plugins
6464

6565
`actions {object}`
6666

67-
#### Example
67+
#### Example
6868

6969
```js
7070
exports.onCreateWebpackConfig = ({
@@ -115,7 +115,7 @@ exports.onCreateBabelConfig = ({
115115
stage, getConfig, rules, loaders, actions
116116
}) => {
117117
actions.setBabelPlugin({
118-
name: `babel-plugin-emotion`,
118+
name: `@emotion/babel-plugin`,
119119
options: {
120120
sourceMap: true,
121121
},

0 commit comments

Comments
 (0)