1.0.4 • Published 5 years ago

svg2react-loader v1.0.4

Weekly downloads
29
License
MIT
Repository
github
Last release
5 years ago

SVG to React Loader npm.io

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' />;
    }
});