smooth-plugin-styled-components

Smooth plugin to add support for styled components

Usage no npm install needed!

<script type="module">
  import smoothPluginStyledComponents from 'https://cdn.skypack.dev/smooth-plugin-styled-components';
</script>

README

smooth-plugin-styled-components

A Smooth plugin for styled-components with built-in server-side rendering support.

Install

npm install smooth-plugin-styled-components styled-components babel-plugin-styled-components

Usage

Edit smooth.config.js:

// smooth.config.js
module.exports = {
  plugins: [
    {
      resolve: `smooth-plugin-styled-components`,
      options: {
        // Add any options here
      },
    },
  ],
}

Options

You can pass options to the plugin, see the Styled Components docs for a full list of options.

For example, to disable the displayName option:

// smooth.config.js
module.exports = {
  plugins: [
    {
      resolve: `smooth-plugin-styled-components`,
      options: {
        displayName: false,
      },
    },
  ],
}

Note: The ssr option will be ignored. Smooth.js will apply it automatically when needed.