Socket
Socket
Sign inDemoInstall

react-fontawesome

Package Overview
Dependencies
3
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.2.0

14

changelog.md
# Changelog
## v1.1.0
- Remove `prepublish` step so builds work on Windows
## v1.0.0
We are production ready! 😬🤘🎉
- Upgrade development node version
- [Tests] Use the modern ReactDOM.render+findDOMNode APIs for React 15 (#10, thanks @ide!)
- Filter which props are passed into the underlying span (#8, thanks @ide!)
- Upgrade ESLint to v2 (#7, thanks @ide!)
- Upgrade to Babel 6 (#6, thanks @ide!)
## v0.3.0

@@ -4,0 +18,0 @@

73

lib/index.js

@@ -23,2 +23,3 @@ 'use strict';

* @param {String} [className] An extra set of CSS classes to add to the component
* @param {Object} [cssModule] Option to pass FontAwesome CSS as a module
* @param {Boolean} [fixedWidth=false] Make buttons fixed width

@@ -43,2 +44,3 @@ * @param {String} [flip=false] Flip the icon's orientation.

className: _react2.default.PropTypes.string,
cssModule: _react2.default.PropTypes.object,
fixedWidth: _react2.default.PropTypes.bool,

@@ -58,2 +60,4 @@ flip: _react2.default.PropTypes.oneOf(['horizontal', 'vertical']),

var border = _props.border;
var cssModule = _props.cssModule;
var className = _props.className;
var fixedWidth = _props.fixedWidth;

@@ -69,48 +73,37 @@ var flip = _props.flip;

var props = _objectWithoutProperties(_props, ['border', 'fixedWidth', 'flip', 'inverse', 'name', 'pulse', 'rotate', 'size', 'spin', 'stack']);
var props = _objectWithoutProperties(_props, ['border', 'cssModule', 'className', 'fixedWidth', 'flip', 'inverse', 'name', 'pulse', 'rotate', 'size', 'spin', 'stack']);
var className = 'fa fa-' + name;
var classNames = [];
if (size) {
className += ' fa-' + size;
if (cssModule) {
classNames.push(cssModule['fa']);
classNames.push(cssModule['fa-' + name]);
size && classNames.push(cssModule['fa-' + size]);
spin && classNames.push(cssModule['fa-spin']);
pulse && classNames.push(cssModule['fa-pulse']);
border && classNames.push(cssModule['fa-border']);
fixedWidth && classNames.push(cssModule['fa-fw']);
inverse && classNames.push(cssModule['fa-inverse']);
flip && classNames.push(cssModule['fa-flip-' + flip]);
rotate && classNames.push(cssModule['fa-rotate-' + rotate]);
stack && classNames.push(cssModule['fa-stack-' + stack]);
} else {
classNames.push('fa');
classNames.push('fa-' + name);
size && classNames.push('fa-' + size);
spin && classNames.push('fa-spin');
pulse && classNames.push('fa-pulse');
border && classNames.push('fa-border');
fixedWidth && classNames.push('fa-fw');
inverse && classNames.push('fa-inverse');
flip && classNames.push('fa-flip-' + flip);
rotate && classNames.push('fa-rotate-' + rotate);
stack && classNames.push('fa-stack-' + stack);
}
if (spin) {
className += ' fa-spin';
}
// Add any custom class names at the end.
className && classNames.push(className);
if (pulse) {
className += ' fa-pulse';
}
if (border) {
className += ' fa-border';
}
if (fixedWidth) {
className += ' fa-fw';
}
if (inverse) {
className += ' fa-inverse';
}
if (flip) {
className += ' fa-flip-' + flip;
}
if (rotate) {
className += ' fa-rotate-' + rotate;
}
if (stack) {
className += ' fa-stack-' + stack;
}
if (this.props.className) {
className += ' ' + this.props.className;
}
return _react2.default.createElement('span', _extends({}, props, {
className: className
className: classNames.join(' ')
}));

@@ -117,0 +110,0 @@ }

{
"name": "react-fontawesome",
"version": "1.1.0",
"version": "1.2.0",
"description": "A React component for the font-awesome icon library.",

@@ -5,0 +5,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc