Discussion

Repng

repng is a npm library which converts any React component to a png file.

The usage of this library is very simple as following.

Usage
  $ repng <ReactComponent>

Options
  -d --out-dir    Directory to save file to
  -f --filename   Specify a custom output filename
  -w --width      Width of image
  -h --height     Height of image
  -p --props      Props in JSON format to pass to the React component
  --css           Path to CSS file to include
  --webfont       Path to custom webfont for rendering

Here are more details.

https://www.npmjs.com/package/repng

https://github.com/jxnblk/repng

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *