$ npm install react-component-preview
import Preview from 'react-component-preview';
<Preview
components={this.components}
code='<Button bsStyle="primary">Primary</Button>'
/>
Name | Type | Default | Description |
---|---|---|---|
code | string | ||
components | object | ||
previewStyle | object | { minHeight: 200 } | |
enableEditor | Boolean | true | Show and hide the editor |
Install the dependencies and devDependencies and start the server.
$ git clone git@github.com:sagarpanda/react-component-preview.git
$ cd react-component-preview
$ npm install
$ npm start
- Update soon...