Skip to content

gutenye/gatsby-plugin-styled-components

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-plugin-styled-components

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.

Install

yarn add gatsby-plugin-styled-components

How to use

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>
    )
  }
}

Copyright

MIT

About

A gatsby plugin for styled-components with server-sider rendering support.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published