alp82 / react-cosmos-glamorous-proxy

A simple proxy for react-cosmos to load glamorous themes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-cosmos-glamorous-proxy

A simple proxy for react-cosmos to load glamorous themes.

It's basically wrapping your components with a ThemeProvider.

Getting started

Be sure to have all needed peer dependencies installed.

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

// config/cosmos/glamorous-proxy.js
import myTheme from 'theme/myTheme';

const GlamorousProxy = createGlamorousProxy({
  theme: myTheme,
});

export default GlamorousProxy;

Use this instance in your proxy config:

// cosmos.proxies.js
import glamorousProxy from 'config/cosmos/glamorous-proxy';

export default [glamorousProxy];

About

A simple proxy for react-cosmos to load glamorous themes.

License:MIT License


Languages

Language:JavaScript 100.0%