2.3.0 • Published 7 years ago

react-component-preview v2.3.0

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

React Component Preview

Click here to see the demo.

NPM Installation

$ npm install react-component-preview

Use

import Preview from 'react-component-preview';
<Preview
  components={this.components}
  code='<Button bsStyle="primary">Primary</Button>'
/>

Props

NameTypeDefaultDescription
codestring
componentsobject
previewStyleobject{ minHeight: 200 }
enableEditorBooleantrueShow and hide the editor

Source Code Run

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

Todos

  • Update soon...