New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-svg-icon

Package Overview
Dependencies
Maintainers
3
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.2.0 to 0.2.2

16

dist/react-svg-icon.js

@@ -63,3 +63,5 @@ (function webpackUniversalModuleDefinition(root, factory) {

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { 'default': obj };
}

@@ -69,3 +71,3 @@ var _componentsIcon = __webpack_require__(1);

var _componentsIcon2 = _interopRequireDefault(_componentsIcon);
exports['default'] = _componentsIcon2['default'];

@@ -84,3 +86,5 @@ module.exports = exports['default'];

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { 'default': obj };
}

@@ -106,7 +110,3 @@ var _react = __webpack_require__(2);

return _react2['default'].createElement(
'svg',
{ className: className.join(' ') },
_react2['default'].createElement('use', { xlinkHref: '#i-' + this.props.name })
);
return _react2['default'].createElement('svg', { className: className.join(' ') }, _react2['default'].createElement('use', { xlinkHref: '#i-' + this.props.name }));
}

@@ -113,0 +113,0 @@

@@ -9,2 +9,3 @@ import React from 'react';

name: React.PropTypes.string.isRequired,
title: React.PropTypes.string,
className: React.PropTypes.string

@@ -14,10 +15,14 @@ },

render() {
const className = ['i'];
if (this.props.className) {
className.push(this.props.className);
const { name, title, className } = this.props;
let classNames = ['i'];
if (className) {
classNames.push(className);
}
return (
<svg className={className.join(' ')}>
<use xlinkHref={'#i-' + this.props.name} />
<svg className={classNames.join(' ')} aria-labelledby={title ? 'svgtitle_' + name : null}>
{title ? (<title id={'svgtitle_' + name}>{title}</title>) : null}
<use xlinkHref={'#i-' + name} />
</svg>

@@ -24,0 +29,0 @@ );

{
"name": "react-svg-icon",
"version": "0.2.0",
"version": "0.2.2",
"description": "React SVG icon component",

@@ -27,6 +27,4 @@ "main": "./build/lib/index.js",

"devDependencies": {
"babel-eslint": "^4.1.6",
"chai": "^3.4.0",
"eslint": "^1.8.0",
"eslint-config-airbnb": "^0.1.0",
"eslint-plugin-react": "^3.6.3",
"jsdom": "^7.0.2",

@@ -33,0 +31,0 @@ "mocha": "^2.3.3",

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