Skip to content

Commit

Permalink
docs: move v4 documentation first
Browse files Browse the repository at this point in the history
  • Loading branch information
sdowding authored and sergeysova committed Nov 1, 2018
1 parent 545c3b8 commit bb1b9e1
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,6 @@ The original `normalize.css` is pulled from [necolas/normalize.css](https://gith
npm install --save styled-normalize
```

### styled-components v2 and v3

```js
// ----- styles/index.js
import styledNormalize from 'styled-normalize'
import { injectGlobal } from 'styled-components'

injectGlobal`
${styledNormalize}
// You can continue writing global styles
body {
padding: 0;
background-color: black;
}
`
```

### styled-components v4

styled-components [createGlobalStyle documentation](https://www.styled-components.com/docs/api#createglobalstyle)
Expand All @@ -52,6 +34,24 @@ const Root = () => (

> For older version of styled-components this API renders to `null`
### styled-components v2 and v3

```js
// ----- styles/index.js
import styledNormalize from 'styled-normalize'
import { injectGlobal } from 'styled-components'

injectGlobal`
${styledNormalize}
// You can continue writing global styles
body {
padding: 0;
background-color: black;
}
`
```

You can also use named imports:

```js
Expand Down

0 comments on commit bb1b9e1

Please sign in to comment.