0.2.0 • Published 6 years ago

react-svg-font-icons v0.2.0

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

React Svg Font Icons

NPM Version NPM Downloads

A React component that makes easy to use popular font icon sets as an SVG element.

Icon sets that supported:

  • font awesome v4
  • simple line icons

Installation

$ npm install --save-dev react-svg-font-icons

Getting Started

React-svg-font-icons use same icon names in different icon sets. You can see and copy these in here

example:

import React from 'react';
import SvgFontIcons from 'react-svg-font-icons';

  const FontAwesomeIcon = () => (
    <SvgFontIcons sets="fontAwesome" name="trash" fill="#333" />
  );

  const SimpleLineIcons = () => (
    <SvgFontIcons sets="simpleLineIcon" name="trash" fill="#333" /> 
  );

If you want use default sets in entire project:

import React from 'react';
import { AwesomeSvg, SimpleLineSvg } from 'react-svg-font-icons';
const IconA () => (
  <AwesomeSvg name="trash" />
);

const IconB = () => (
  <SimpleLineSvg name="trash" />
);

Props

prop keydefault propsdescribe
setsfontAwesomeicons set
namenoneicon name
size1remsize set svg width and height value
fillnoneicon color if you want change svg color with css, prevent to change this prop
classNamenonecustom class name

License

MIT © RE7A

0.2.0

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.5

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago