react-svg-icon
Advanced tools
Comparing version 0.1.1 to 0.2.0
@@ -23,4 +23,2 @@ 'use strict'; | ||
render: function render() { | ||
var useTag = '<use xlink:href="#i-' + this.props.name + '" />'; | ||
var className = ['i']; | ||
@@ -31,3 +29,7 @@ if (this.props.className) { | ||
return _react2['default'].createElement('svg', { className: className.join(' '), dangerouslySetInnerHTML: { __html: useTag } }); | ||
return _react2['default'].createElement( | ||
'svg', | ||
{ className: className.join(' ') }, | ||
_react2['default'].createElement('use', { xlinkHref: '#i-' + this.props.name }) | ||
); | ||
} | ||
@@ -34,0 +36,0 @@ |
{ | ||
"name": "react-svg-icon", | ||
"version": "0.0.5", | ||
"version": "0.1.1", | ||
"description": "React SVG icon component", | ||
"main": "./lib/index", | ||
"main": "lib/index.js", | ||
"repository": { | ||
@@ -16,7 +16,9 @@ "type": "git", | ||
"authors": [ | ||
"Thomas Winter" | ||
"Thomas Winter", | ||
"Vincent Audebert", | ||
"Thibaud Colas" | ||
], | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"react": "^0.13.3" | ||
"react": "^0.14.3" | ||
}, | ||
@@ -30,2 +32,3 @@ "tags": [ | ||
"react", | ||
"react-component", | ||
"svg", | ||
@@ -32,0 +35,0 @@ "icon" |
@@ -1,2 +0,2 @@ | ||
# React SVG Icon [](https://www.npmjs.com/package/react-svg-icon) | ||
# React SVG Icon [](https://www.npmjs.com/package/react-svg-icon) [](https://travis-ci.org/springload/react-svg-icon) [](https://david-dm.org/springload/react-svg-icon#info=devDependencies) | ||
@@ -9,2 +9,14 @@ React SVG icon component | ||
## Commands | ||
You need `rackt-cli v0.5.3` to execute some of these commands. | ||
- `npm install` install node dependencies | ||
- `npm start` run server | ||
- `npm test` run tests | ||
- `npm build` build component | ||
- `npm publish` publish component to npm (verify versions in package.json and bower.json) | ||
- `rackt pages` rebuild gh-pages branch | ||
## Include your icon component | ||
@@ -20,1 +32,5 @@ | ||
``` | ||
## Example | ||
You can find an example here: https://springload.github.io/react-svg-icon/ |
{ | ||
"name": "react-svg-icon", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "React SVG icon component", | ||
"main": "./dist/react-svg-icon", | ||
"main": "./build/lib/index.js", | ||
"repository": { | ||
@@ -17,3 +17,4 @@ "type": "git", | ||
"test": "rackt test --single-run --browsers Firefox", | ||
"start": "rackt server" | ||
"start": "rackt server", | ||
"build": "rackt build" | ||
}, | ||
@@ -20,0 +21,0 @@ "authors": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
41578
160
1