Socket
Socket
Sign inDemoInstall

@soof-golan/react-gist

Package Overview
Dependencies
3
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @soof-golan/react-gist

Github Gist React component


Version published
Weekly downloads
1
Maintainers
1
Install size
8.96 kB
Created
Weekly downloads
 

Readme

Source

react-gist

NPM

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

Preview

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
);

Edit react-gist-example-single-file

Multi-file gist:

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

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

Edit react-gist-example-multi-file

Usage

<Gist id={string} file={string} />

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

License

MIT, see LICENSE.md for details.

Keywords

FAQs

Last updated on 26 Nov 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc