@@ -17,7 +17,7 @@ gatsby new emotion-tutorial https://github.com/gatsbyjs/gatsby-starter-hello-wor
17
17
Second, install the necessary dependencies for Emotion and Gatsby.
18
18
19
19
``` shell
20
- npm install gatsby-plugin-emotion @emotion/react @emotion/styled
20
+ npm install gatsby-plugin-emotion @emotion/core@^10.0.5 @emotion/styled
21
21
```
22
22
23
23
And then add the plugin to your site's ` gatsby-config.js ` :
@@ -35,7 +35,7 @@ Now create a sample Emotion page at `src/pages/index.js`:
35
35
``` jsx:title=src/pages/index.js
36
36
import React from " react"
37
37
import styled from " @emotion/styled"
38
- import { css } from " @emotion/react "
38
+ import { css } from " @emotion/core "
39
39
40
40
const Container = styled .div `
41
41
margin: 3rem auto;
@@ -123,7 +123,7 @@ To start, create a new Gatsby site with the [hello world starter](https://github
123
123
``` shell
124
124
gatsby new global-styles https://github.com/gatsbyjs/gatsby-starter-hello-world
125
125
cd global-styles
126
- npm install gatsby-plugin-emotion @emotion/react @emotion/styled
126
+ npm install gatsby-plugin-emotion @emotion/core@^10.0.5 @emotion/styled
127
127
```
128
128
129
129
Create ` gatsby-config.js ` and add the Emotion plugin:
@@ -138,7 +138,7 @@ Next, add a layout component at `src/components/layout.js`:
138
138
139
139
``` jsx:title=src/components/layout.js
140
140
import React from " react"
141
- import { Global , css } from " @emotion/react "
141
+ import { Global , css } from " @emotion/core "
142
142
import styled from " @emotion/styled"
143
143
144
144
const Wrapper = styled (" div" )`
0 commit comments