react-svg-icon
Advanced tools
Comparing version 0.0.3 to 0.0.6
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
value: true | ||
}); | ||
@@ -15,22 +15,21 @@ | ||
displayName: 'Icon', | ||
displayName: 'Icon', | ||
propTypes: { | ||
name: _react2['default'].PropTypes.string.isRequired, | ||
className: _react2['default'].PropTypes.string | ||
}, | ||
propTypes: { | ||
name: _react2['default'].PropTypes.string.isRequired, | ||
className: _react2['default'].PropTypes.string | ||
}, | ||
render: function render() { | ||
render: function render() { | ||
var useTag = '<use xlink:href="#i-' + this.props.name + '" />'; | ||
var useTag = '<use xlink:href="#i-' + this.props.name + '" />'; | ||
var className = ['i']; | ||
if (this.props.className) { | ||
className.push(this.props.className); | ||
} | ||
var className = ['i']; | ||
if (this.props.className) { | ||
className.push(this.props.className); | ||
} | ||
return _react2['default'].createElement('svg', { className: className.join(' '), dangerouslySetInnerHTML: { __html: useTag } }); | ||
} | ||
return _react2['default'].createElement('svg', { className: className.join(" "), dangerouslySetInnerHTML: { __html: useTag } }); | ||
} | ||
}); | ||
module.exports = exports['default']; |
{ | ||
"name": "react-svg-icon", | ||
"version": "0.0.3", | ||
"version": "0.0.5", | ||
"description": "React SVG icon component", | ||
"main": "./lib/index.js", | ||
"main": "./lib/index", | ||
"repository": { | ||
@@ -7,0 +7,0 @@ "type": "git", |
@@ -1,2 +0,2 @@ | ||
# React SVG Icon | ||
# React SVG Icon [![npm](https://img.shields.io/npm/v/react-svg-icon.svg?style=flat-square)](https://www.npmjs.com/package/react-svg-icon) | ||
@@ -11,3 +11,3 @@ React SVG icon component | ||
``` | ||
```js | ||
import Icon from 'react-svg-icon'; | ||
@@ -14,0 +14,0 @@ |
@@ -79,3 +79,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
value: true | ||
}); | ||
@@ -91,21 +91,20 @@ | ||
displayName: 'Icon', | ||
displayName: 'Icon', | ||
propTypes: { | ||
name: _react2['default'].PropTypes.string.isRequired, | ||
className: _react2['default'].PropTypes.string | ||
}, | ||
propTypes: { | ||
name: _react2['default'].PropTypes.string.isRequired, | ||
className: _react2['default'].PropTypes.string | ||
}, | ||
render: function render() { | ||
render: function render() { | ||
var useTag = '<use xlink:href="#i-' + this.props.name + '" />'; | ||
var useTag = '<use xlink:href="#i-' + this.props.name + '" />'; | ||
var className = ['i']; | ||
if (this.props.className) { | ||
className.push(this.props.className); | ||
} | ||
var className = ['i']; | ||
if (this.props.className) { | ||
className.push(this.props.className); | ||
} | ||
return _react2['default'].createElement('svg', { className: className.join(' '), dangerouslySetInnerHTML: { __html: useTag } }); | ||
} | ||
return _react2['default'].createElement('svg', { className: className.join(" "), dangerouslySetInnerHTML: { __html: useTag } }); | ||
} | ||
}); | ||
@@ -112,0 +111,0 @@ module.exports = exports['default']; |
@@ -13,16 +13,14 @@ import React from 'react'; | ||
render() { | ||
const useTag = '<use xlink:href="#i-' + this.props.name + '" />'; | ||
var useTag = '<use xlink:href="#i-' + this.props.name + '" />'; | ||
let className = ['i']; | ||
if (this.props.className) { | ||
className.push(this.props.className); | ||
} | ||
var className = ['i']; | ||
if (this.props.className) { | ||
className.push(this.props.className) | ||
} | ||
return ( | ||
<svg className={className.join(" ")} dangerouslySetInnerHTML={{__html: useTag }} /> | ||
); | ||
return ( | ||
<svg className={className.join(' ')} dangerouslySetInnerHTML={{__html: useTag }} /> | ||
); | ||
} | ||
}); |
{ | ||
"name": "react-svg-icon", | ||
"version": "0.0.3", | ||
"version": "0.0.6", | ||
"description": "React SVG icon component", | ||
"main": "./lib/index.js", | ||
"main": "./lib/index", | ||
"repository": { | ||
@@ -31,7 +31,12 @@ "type": "git", | ||
"tags": [ | ||
"react", "svg", "icon" | ||
"react", | ||
"svg", | ||
"icon" | ||
], | ||
"keywords": [ | ||
"react", "svg", "icon" | ||
"react", | ||
"react-component", | ||
"svg", | ||
"icon" | ||
] | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# React SVG Icon | ||
# React SVG Icon [![npm](https://img.shields.io/npm/v/react-svg-icon.svg?style=flat-square)](https://www.npmjs.com/package/react-svg-icon) | ||
@@ -11,3 +11,3 @@ React SVG icon component | ||
``` | ||
```js | ||
import Icon from 'react-svg-icon'; | ||
@@ -14,0 +14,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39401