Skip to content

Commit

Permalink
docs: temporary fix to emotion tutorial (#28248)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladar authored Nov 23, 2020
1 parent 70b81a6 commit b346804
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/docs/emotion.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gatsby new emotion-tutorial https://github.com/gatsbyjs/gatsby-starter-hello-wor
Second, install the necessary dependencies for Emotion and Gatsby.

```shell
npm install gatsby-plugin-emotion @emotion/react @emotion/styled
npm install gatsby-plugin-emotion @emotion/core@^10.0.5 @emotion/styled
```

And then add the plugin to your site's `gatsby-config.js`:
Expand All @@ -35,7 +35,7 @@ Now create a sample Emotion page at `src/pages/index.js`:
```jsx:title=src/pages/index.js
import React from "react"
import styled from "@emotion/styled"
import { css } from "@emotion/react"
import { css } from "@emotion/core"

const Container = styled.div`
margin: 3rem auto;
Expand Down Expand Up @@ -123,7 +123,7 @@ To start, create a new Gatsby site with the [hello world starter](https://github
```shell
gatsby new global-styles https://github.com/gatsbyjs/gatsby-starter-hello-world
cd global-styles
npm install gatsby-plugin-emotion @emotion/react @emotion/styled
npm install gatsby-plugin-emotion @emotion/core@^10.0.5 @emotion/styled
```

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

```jsx:title=src/components/layout.js
import React from "react"
import { Global, css } from "@emotion/react"
import { Global, css } from "@emotion/core"
import styled from "@emotion/styled"

const Wrapper = styled("div")`
Expand Down

0 comments on commit b346804

Please sign in to comment.