Noteworthy Programming Masterpiece

    react-github-gists

    1.2.1 • Public • Published

    react-github-gists

    Simple and powerful react component to embed a single gist or all gists from a user in your react application.

    Based on react-embed-gist by msaracevic

    NPM JavaScript Style Guide

    Install

    npm install --save react-github-gists

    Usage

    Import in your react component.

    This component takes two props:

    1. user (required)
    2. gistID (optional)

    To embed a particular gist, use both the props. Else if you want to embed all the gists from a use, pass both props to the component.

    For example:

    import ReactGithubGists from "react-github-gists";
     
    // This will embed all the gist from user
    <ReactGithubGists user="toughyear" />
     
    // This will embed a particular gist
    <ReactGithubGists user="toughyear" gistID="486446951c7e082aac19568ea679af35" />
     

    Attributes

    • user - username of which you want to display the gist of.
    • gistID -optional, gist you want to display
    • file - optional, if you want to show just a single file from the gist, you can specify it here
    • wrapperClass - optional, if you want to pass your own class to article wrapping the gist
    • titleClass - optional, if you want to pass your own class to h2 title of the gist
    • contentClass - optional, if you want to pass your own class to section wrapping the content
    • errorClass - optional, if you want to pass your own class to article wrapping the error message
    • loadingClass - optional, if you want to pass your own class to article wrapper which is displayed during loading time

    License

    MIT © Rajeev Singh Naruka

    Install

    npm i react-github-gists

    DownloadsWeekly Downloads

    2

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    13.2 kB

    Total Files

    7

    Last publish

    Collaborators

    • toughyear