0.1.0 • Published 9 years ago

react-codepen v0.1.0

Weekly downloads
7
License
MIT
Repository
github
Last release
9 years ago

React <Codepen>

A react component to embed pens from codepen.io

Getting Started

  • Install with NPM - npm install --save react-codepen

Usage

var React   = require('react');
var Codepen = require('react-codepen');

var Component = React.createClass({
  render: function () {
    return (
      <Codepen user="jasonbellamy" hash="XmWNEY"></Codepen>
    );
  }
});

Options

PropertyTypeArgumentValuesDefaultDescription
userstring<required>nullcodepen.io username.
hashstring<required>nullthe hash id of the pen to display.
heightstring<optional>px, %250pxthe height of the pen.
widthstring<optional>px, %100%the width of the pen.
tabstring<optional>css, html, js, resultresultthe default tab that should be displayed.
themestring<optional>defaultthe theme the pen should use.

Developing

react-codepen is built using ES6. Run the following task to compile the src/ into dist/.

npm run build

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.

License

Copyright (c) 2015 Jason Bellamy
Licensed under the MIT license.