A simple proxy for react-cosmos to load glamorous themes.
It's basically wrapping your components with a ThemeProvider
.
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];