bnchrch / react-icon

Icon component for React

Home Page:https://nkt.github.io/react-icon/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Icon

Build Status

Simple component for icons in your React app.

Installation

npm install --save react-icon

Usage

const React = require('react');
const Icon = require('react-icon');

const StarCounter = React.createClass({
  render() {
    return (
      <div>
        <span>This user have {this.props.count}</span>
        <Icon glyph="star" />
      </div>
    );
  }
});

module.exports = StarCounter;

By default component uses fa as class prefix (fa fa-star). This behavior customizable:

const Icon = require('react-icon');

Icon.setDefaultFontPrefix('glyphicon') // glyphicon glyphicon-star

License

License

About

Icon component for React

https://nkt.github.io/react-icon/

License:MIT License


Languages

Language:JavaScript 100.0%