svg2react-loader
A Webpack Loader to turn SVGs into React Components
Last updated 10 months 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 (10 months ago)

5 Versions

  • 1.0.4                                ...           10 months ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (2)
Downloads
Today 4
This Week 4
This Month 32
Last Day 0
Last Week 24
Last Month 100
Dependencies (3)
Dev Dependencies (10)

Copyright 2014 - 2016 © taobao.org |