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

cf-component-icon

Package Overview
Dependencies
Maintainers
9
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-component-icon - npm Package Compare versions

Comparing version 1.1.3 to 2.0.0

54

lib/Icon.js
'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -12,7 +14,6 @@

var _require = require('./options');
var _require = require('./options'),
TYPES = _require.TYPES,
SIZES = _require.SIZES;
var TYPES = _require.TYPES;
var SIZES = _require.SIZES;
var Icon = function (_React$Component) {

@@ -24,27 +25,30 @@ _inherits(Icon, _React$Component);

return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
return _possibleConstructorReturn(this, (Icon.__proto__ || Object.getPrototypeOf(Icon)).apply(this, arguments));
}
Icon.prototype.render = function render() {
var className = 'cf-icon cf-icon--' + this.props.type;
_createClass(Icon, [{
key: 'render',
value: function render() {
var className = 'cf-icon cf-icon--' + this.props.type;
if (this.props.size) {
className += ' cf-icon--' + this.props.size;
}
if (this.props.size) {
className += ' cf-icon--' + this.props.size;
}
if (this.props.border) className += ' cf-icon--border';
if (this.props.spin) className += ' cf-icon--spin';
if (this.props.muted) className += ' cf-icon--muted';
if (this.props.white) className += ' cf-icon--white';
if (this.props.border) className += ' cf-icon--border';
if (this.props.spin) className += ' cf-icon--spin';
if (this.props.muted) className += ' cf-icon--muted';
if (this.props.white) className += ' cf-icon--white';
return React.createElement(
'i',
{ className: className, role: this.props.role },
this.props.label && React.createElement(
'span',
{ className: 'cf-icon__label' },
this.props.label
)
);
};
return React.createElement(
'i',
{ className: className, role: this.props.role },
this.props.label && React.createElement(
'span',
{ className: 'cf-icon__label' },
this.props.label
)
);
}
}]);

@@ -63,6 +67,4 @@ return Icon;

role: PropTypes.string
};
;
module.exports = Icon;
{
"name": "cf-component-icon",
"description": "CloudFlare Icon Component",
"version": "1.1.3",
"version": "2.0.0",
"main": "lib/index.js",

@@ -12,8 +12,8 @@ "author": "James Kyle <jkyle@cloudflare.com>",

"dependencies": {
"react": "^0.14.2"
"react": "^0.14.2 || ^15.0.0-0"
},
"devDependencies": {
"assert-equal-jsx": "^1.0.0",
"react-dom": "^0.14.2"
"react-dom": "^15.0.0-0"
}
}
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