Socket
Socket
Sign inDemoInstall

react-fontawesome

Package Overview
Dependencies
0
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.3 to 0.1.0

CHANGELOG.md

36

index.js

@@ -1,4 +0,4 @@

var React = require('react');
import React from 'react'
var FontAwesome = React.createClass({
export default React.createClass({

@@ -15,52 +15,50 @@ propTypes: {

rotate: React.PropTypes.oneOf(['90', '180', '270']),
stack: React.PropTypes.oneOf(['1x', '2x']),
stack: React.PropTypes.oneOf(['1x', '2x'])
},
render: function () {
var className = 'fa fa-' + this.props.name;
render() {
var className = `fa fa-${this.props.name}`
if (this.props.size) {
className += ' fa-' + this.props.size;
className += ` fa-${this.props.size}`
}
if (this.props.spin) {
className += ' fa-spin';
className += ' fa-spin'
}
if (this.props.pulse) {
className += ' fa-pulse';
className += ' fa-pulse'
}
if (this.props.border) {
className += ' fa-border';
className += ' fa-border'
}
if (this.props.fixedWidth) {
className += ' fa-fw';
className += ' fa-fw'
}
if (this.props.inverse) {
className += ' fa-inverse';
className += ' fa-inverse'
}
if (this.props.flip) {
className += ' fa-flip-' + this.props.flip;
className += ` fa-flip-${this.props.flip}`
}
if (this.props.rotate) {
className += ' fa-rotate-' + this.props.rotate;
className += ` fa-rotate-${this.props.rotate}`
}
if (this.props.stack) {
className += ' fa-stack-' + this.props.stack;
className += ` fa-stack-${this.props.stack}`
}
if (this.props.className) {
className += ' ' + this.props.className;
className += ` ${this.props.className}`
}
return React.createElement('span', { className: className });
return <span {...this.props} className={className} />
}
});
module.exports = FontAwesome;
})
{
"name": "react-fontawesome",
"version": "0.0.3",
"version": "0.1.0",
"description": "A React FontAwesome component.",
"repository": {
"type": "git",
"url": "builtbybig/react-fontawesome"
"url": "https://github.com/builtbybig/react-fontawesome"
},

@@ -14,7 +14,7 @@ "bugs": {

"scripts": {
"dist": "./node_modules/webpack/bin/webpack.js --colors --progress",
"watch:dist": "./node_modules/webpack/bin/webpack.js --colors --porgress --watch",
"watch:test": "./node_modules/mocha/bin/mocha -w",
"watch": "./node_modules/parallelshell/index.js 'npm run watch:test' 'npm run watch:dist'",
"test": "./node_modules/mocha/bin/mocha"
"dist": "webpack --colors --progress",
"watch:dist": "webpack --colors --porgress --watch",
"watch:test": "mocha -w",
"watch": "parallelshell 'npm run watch:test' 'npm run watch:dist'",
"test": "mocha"
},

@@ -43,2 +43,5 @@ "keywords": [

"devDependencies": {
"babel": "^5.1.13",
"babel-core": "^5.1.13",
"babel-loader": "^5.0.0",
"jsdom": "^3.1.0",

@@ -48,2 +51,3 @@ "mocha": "^2.1.0",

"parallelshell": "^1.0.4",
"react": "^0.13.2",
"should": "^4.6.5",

@@ -55,5 +59,6 @@ "webpack": "^1.5.3"

},
"dependencies": {
"react": "^0.12.2"
"dependencies": {},
"peerDependencies": {
"react": "0.13.x"
}
}

@@ -6,10 +6,2 @@ # react-fontawesome

## Features
- No external dependencies on build tools.
- Not necessary to support ES6 in your application.
- Packaged for NPM as well as without.
- Remove the `fa-` prefix from all settings.
## Usage

@@ -28,3 +20,5 @@

size="lg"
className="super-crazy-colors" />
className="super-crazy-colors"
style={{ textShadow: '0 1px 0 rgba(0, 0, 0, 0.1)' }}
/>
);

@@ -31,0 +25,0 @@ }

@@ -8,3 +8,3 @@ var React = require('react/addons');

describe('FontAwesome', function () {
var element, classes;
var classes;

@@ -11,0 +11,0 @@ // Use mocha-jsdom.

@@ -6,3 +6,12 @@ module.exports = {

filename: 'react-fontwesome.js',
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: ['babel-loader']
}
]
}
};

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc