react-cosmos-background-proxy
Easily apply both global and fixture specific background settings for react-cosmos
Installation
npm install --save-dev react-cosmos-background-proxy
Usage
Basic
import createBackgroundProxy from 'react-cosmos-background-proxy';
export default [createBackgroundProxy()];
export default {
component: MyComponent,
background: {
backgroundColor: 'white'
}
};
Global Styling
import createBackgroundProxy from 'react-cosmos-background-proxy';
export default [
createBackgroundProxy(() => {
require('node_modules/some-css-framework/dist/styles.css');
})
];
Contributions are more than welcome! :beers: