Wondering what’s next for npm?Check out our public roadmap! »

    octicons-react

    1.0.9 • Public • Published

    React Octicons

    Installation & Usage

    NPM

    npm install --save octicons-react
    # or with yarn
    yarn add octicons-react

    A single octicon

    const { Octicon, markGithub } = require('octicons-react')
    // import Octicon, { markGithub } from 'octicons-react'
    
    ReactDOM.render(
      <Octicon icon={markGithub} />,
      document.querySelector('#root')
    )

    All octicons

    const { Octicon, Octicons } = require('octicons-react')
    // import Octicon, { Octicons } from 'octicons-react'
    
    ReactDOM.render(
      <Octicon icon={Octicons.alert} />,
      document.querySelector('#root')
    )

    API

    Props

    • icon (object) - Octicon from octicons-modular library
    • scale (number) - Scale
      • Default: 1
    • className (string) - Additional classes
      • Default: null
    • label (string) - Label
      • Default: null
    ReactDOM.render(
      <Octicon icon={icon} scale={1} className="additional-class" label="another label" />,
      document.querySelector('#root')
    )

    Development & Testing

    Please check the Contributing Guidelines.

    Contribution

    Issues and PRs are welcome !

    Install

    npm i octicons-react

    DownloadsWeekly Downloads

    84

    Version

    1.0.9

    License

    MIT

    Unpacked Size

    7.14 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar