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

react-ajaxing

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-ajaxing - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

36

dist/index.js
// Generated by CoffeeScript 1.9.3
var React;
var React, objectAsign;

@@ -8,11 +8,19 @@ React = require('react');

objectAsign = require('object-assign');
module.exports = React.createClass({
displayName: "ajaxing",
propTypes: {
loading: React.PropTypes.bool.isRequired,
size: React.PropTypes.number,
color: React.PropTypes.string
},
getDefaultProps: function() {
return {
size: '20'
size: 20,
color: '#FFF'
};
},
render: function() {
var classes, style;
var bounceStyle, classes, size, style;
classes = 'react-ajaxing';

@@ -22,8 +30,12 @@ if (this.props.className) {

}
if (this.props.size) {
style = {
width: this.props.size + "px",
height: this.props.size + "px"
};
size = {
width: this.props.size + "px",
height: this.props.size + "px"
};
if (this.props.style) {
style = objectAsign(this.props.style, size);
}
bounceStyle = {
backgroundColor: this.props.color
};
if (this.props.loading) {

@@ -35,7 +47,9 @@ return React.createElement("div", React.__spread({}, this.props, {

"className": "ajax-double-bounce",
"style": style
"style": size
}, React.createElement("div", {
"className": "ajax-double-bounce1"
"className": "ajax-double-bounce1",
"style": bounceStyle
}), React.createElement("div", {
"className": "ajax-double-bounce2"
"className": "ajax-double-bounce2",
"style": bounceStyle
})));

@@ -42,0 +56,0 @@ } else {

{
"name": "react-ajaxing",
"description": "tell the component ajax is sending",
"version": "0.0.4",
"version": "0.0.5",
"author": "Bingo Yang <blackbing@gmail.com>",

@@ -15,3 +15,4 @@ "browserify": {

"dependencies": {
"cssify": "^0.7.0"
"cssify": "^0.7.0",
"object-assign": "^3.0.0"
},

@@ -18,0 +19,0 @@ "devDependencies": {

@@ -27,3 +27,3 @@ # react-ajaxing

<button type ="submit" onClick={@login}>
<Spinner loading={@state.loading} size={20}><span>Login</span></Spinner>
<Spinner loading={@state.loading} size={20} color="red"><span>Login</span></Spinner>
</button>

@@ -36,6 +36,8 @@ )

### loading(boolean): indicate it is loading status or not
### size(number): spinner size(px)
default: 20
### loading(boolean): indicate it is loading status or not
### color(string): spinner color
default: '#FFF'

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