Created
May 21, 2019 15:17
-
-
Save donghoon-song/aa2cc36680e143499af5b0782a28ab68 to your computer and use it in GitHub Desktop.
Styled Components v4 : injectGlobal -> createGlobalStyle example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createGlobalStyle } from "styled-components" | |
const GlobalStyle = createGlobalStyle` | |
body { | |
padding: 0; | |
margin: 0; | |
} | |
`; | |
class App extends Component { | |
render() { | |
return ( | |
<Container> | |
<GlobalStyle/> | |
</Container> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment