1.1.1 • Published 6 years ago

react-cosmos-styled-components-proxy v1.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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];