svg2react-loader
A Webpack Loader to turn SVGs into React Components
Last updated a year ago by onbing .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install svg2react-loader 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.4                                ...           latest (a year ago)

5 Versions

  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (2)
Downloads
Today 7
This Week 36
This Month 48
Last Day 10
Last Week 11
Last Month 75
Dependencies (3)
Dev Dependencies (10)

Copyright 2014 - 2016 © taobao.org |