Skip to content

Commit b346804

Browse files
authored
docs: temporary fix to emotion tutorial (#28248)
1 parent 70b81a6 commit b346804

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/docs/emotion.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ gatsby new emotion-tutorial https://github.com/gatsbyjs/gatsby-starter-hello-wor
1717
Second, install the necessary dependencies for Emotion and Gatsby.
1818

1919
```shell
20-
npm install gatsby-plugin-emotion @emotion/react @emotion/styled
20+
npm install gatsby-plugin-emotion @emotion/core@^10.0.5 @emotion/styled
2121
```
2222

2323
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`:
3535
```jsx:title=src/pages/index.js
3636
import React from "react"
3737
import styled from "@emotion/styled"
38-
import { css } from "@emotion/react"
38+
import { css } from "@emotion/core"
3939

4040
const Container = styled.div`
4141
margin: 3rem auto;
@@ -123,7 +123,7 @@ To start, create a new Gatsby site with the [hello world starter](https://github
123123
```shell
124124
gatsby new global-styles https://github.com/gatsbyjs/gatsby-starter-hello-world
125125
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
127127
```
128128

129129
Create `gatsby-config.js` and add the Emotion plugin:
@@ -138,7 +138,7 @@ Next, add a layout component at `src/components/layout.js`:
138138

139139
```jsx:title=src/components/layout.js
140140
import React from "react"
141-
import { Global, css } from "@emotion/react"
141+
import { Global, css } from "@emotion/core"
142142
import styled from "@emotion/styled"
143143

144144
const Wrapper = styled("div")`

0 commit comments

Comments
 (0)