MOVED TO gatsby Official repository https://github.com/gatsbyjs/gatsby/tree/1.0/packages/gatsby-plugin-styled-components
A gatsby plugin for styled-components with server-sider rendering support.
yarn add gatsby-plugin-styled-components
edit gatsby-config.js
plugins: [
`gatsby-plugin-styled-components`,
]
edit src/html.js
module.exports = class extends React.Component {
render() {
return (
<html lang="en">
<head>
{this.props.styles}
</head>
<body>
<div id="___gatsby" dangerouslySetInnerHTML={{ __html: this.props.body }} />
</body>
</html>
)
}
}
MIT