Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-svg-icon

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-svg-icon - npm Package Compare versions

Comparing version 0.0.3 to 0.0.6

29

build/lib/components/Icon.js
'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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc