1.1.3 • Published 6 years ago

react-gist-burkov v1.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

react-gist

NPM

Use this component to add a github gist on your website.

Get the id from the gist url https://gist.github.com/{your_name}/{id} and set it as a property of the component.

Example

Single-file gist:

var React = require('react');
var Gist = require('react-gist');

React.render(
    <Gist id='5104372' />,
    document.body
);

Multi-file gist:

var React = require('react');
var Gist = require('react-gist');

React.render(
    <Gist id='5995ea726914f280afb3' file='Chef-Dockerfile' />,
    document.body
);

Usage

<Gist id={string} />

  • id {string} Id of the gist
  • file {string} Name of a specific file in a multi-file gist

demo

To run the demo, install beefy and browserify:

npm i beefy browserify -g

Then:

npm run demo

License

MIT, see LICENSE.md for details.