1.2.0 • Published 6 years ago
salt-svg-loader v1.2.0
SVG to React Loader
A Webpack Loader to convert SVG into React Component
Feature
- SVG optimazation using SVGO, default config see here
- transform svg slug attr name (like
fill-opacity
) to camel case (likefillOpacity
) - generate shadow mask covering svg to optimize svg icon clicking experience
Installation
tnpm install salt-svg-loader
##Usage
var React = require('react');
var Icon = require('babel!salt-svg!./my-icon.svg?name=Icon');
module.exports = React.createClass({
render () {
return <Icon className='normal' />;
}
});
Fork svg2react-loader, and has been reconstructed and optimized.
1.2.0
6 years ago
1.2.0-beta.1
6 years ago
1.2.0-beta.0
6 years ago
1.1.3
7 years ago
1.1.2
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.1.0-beta.2
7 years ago
1.1.0-beta.1
7 years ago
1.1.0-beta.0
7 years ago
1.0.0
7 years ago