Render a Glamorous React component as static html, useful for visual regression tests.
Originally built for use with component-image.
npm i -D render-glamorous
import renderGlamorous from 'render-glamorous';
import MyComponent from './components/my-component';
const htmlString = renderGlamorous(MyComponent); // returns static html markup with inline CSS
npm i -D render-glamorous component-image
import { generateImage } from 'component-image';
import renderGlamorous from 'render-glamorous';
import MyComponent from './components/my-component';
generateImage(MyComponent, {
renderer: renderGlamorous
}).then(image => {
// do something
});