Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

svg2react-loader

1.0.4 • Public • Published

SVG to React Loader

A Webpack Loader to turn SVGs into React Components

Fork from: https://github.com/jhamlet/svg-react-loader, and make it simple.

Installation

npm install svg2react-loader

Usage

var React = require('react');
var Icon = require('babel!svg2react!./my-icon.svg?name=Icon');
 
module.exports = React.createClass({
    render () {
        return <Icon className='normal' />;
    }
});

install

npm i svg2react-loader

Downloadsweekly downloads

257

version

1.0.4

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability