react-cosmos-styled-components-proxy

1.1.1 • Public • Published

react-cosmos-styled-components-proxy

A simple proxy for react-cosmos to load styled-components themes.

It's basically wrapping your components with a ThemeProvider.

Forked from react-cosmos-glamorous-proxy

Getting started

Be sure to have all needed peer dependencies installed.

Import styled-components-proxy and create a new proxy instance with your theme:

// src/cosmos.proxies.js
import createStyledComponentsProxy from "react-cosmos-styled-components-proxy";
import theme from "theme/myTheme";
 
const styledComponentsProxy = createStyledComponentsProxy({
  theme
});
 
export default  = [styledComponentsProxy];

Readme

Keywords

none

Package Sidebar

Install

npm i react-cosmos-styled-components-proxy

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

2.05 kB

Total Files

4

Last publish

Collaborators

  • johnrees