react-notification
Advanced tools
Comparing version 2.1.0 to 2.2.0-beta
@@ -11,3 +11,3 @@ 'use strict'; | ||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
@@ -23,2 +23,4 @@ var _react = require('react'); | ||
var Notification = (function (_Component) { | ||
_inherits(Notification, _Component); | ||
function Notification() { | ||
@@ -118,11 +120,9 @@ var _this = this; | ||
if (_this.props.onClick && typeof _this.props.onClick === 'function') { | ||
_this.props.onClick(); | ||
} else { | ||
return; | ||
return _this.props.onClick(event); | ||
} | ||
return; | ||
}; | ||
} | ||
_inherits(Notification, _Component); | ||
Notification.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { | ||
@@ -134,2 +134,7 @@ if (nextProps.onDismiss && nextProps.isActive) { | ||
/* | ||
* @description Dynamically get the styles for the bar. | ||
* @returns {object} result The style. | ||
*/ | ||
Notification.prototype.render = function render() { | ||
@@ -183,7 +188,2 @@ return _react2['default'].createElement( | ||
/* | ||
* @description Dynamically get the styles for the bar. | ||
* @returns {object} result The style. | ||
*/ | ||
/* | ||
* @function getActionStyle | ||
@@ -190,0 +190,0 @@ * @description Dynamically get the styles for the action text. |
import React, { Component } from 'react'; | ||
import { render } from 'react-dom'; | ||
import Notification from 'notification'; | ||
@@ -108,2 +109,2 @@ | ||
React.render(<Example />, document.body); | ||
render(<Example />, document.querySelector('#mount')); |
{ | ||
"name": "react-notification", | ||
"version": "2.1.0", | ||
"version": "2.2.0-beta", | ||
"description": "Snackbar style notification component for React.", | ||
@@ -31,14 +31,16 @@ "main": "dist/notification.js", | ||
"homepage": "https://github.com/pburtchaell/react-notification", | ||
"peerDependencies": { | ||
"react": "^0.14.0 || 0.14.0-beta1 || 0.14.0-beta2 || 0.14.0-beta3" | ||
}, | ||
"dependencies": { | ||
"object-assign": "^2.0.0", | ||
"react": "^0.13.3" | ||
"object-assign": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"babel": "^5.5.8", | ||
"babel-core": "^5.5.8", | ||
"babel-eslint": "^3.1.23", | ||
"babel-loader": "^5.1.4", | ||
"eslint": "^0.24.0", | ||
"eslint-config-airbnb": "0.0.6", | ||
"eslint-plugin-react": "^2.6.4", | ||
"babel": "^5.8.21", | ||
"babel-core": "^5.8.22", | ||
"babel-eslint": "^4.0.10", | ||
"babel-loader": "^5.3.2", | ||
"eslint": "^1.2.0", | ||
"eslint-config-airbnb": "^0.0.7", | ||
"eslint-plugin-react": "^3.2.3", | ||
"expect": "^1.6.0", | ||
@@ -50,6 +52,9 @@ "html-webpack-plugin": "^1.6.0", | ||
"node-libs-browser": "^0.5.2", | ||
"react-hot-loader": "^1.2.7", | ||
"webpack": "^1.7.3", | ||
"webpack-dev-server": "^1.9.0" | ||
"react": "^0.14.0-beta1", | ||
"react-addons-test-utils": "^0.14.0-beta3", | ||
"react-dom": "^0.14.0-beta3", | ||
"react-hot-loader": "^1.2.8", | ||
"webpack": "^1.11.0", | ||
"webpack-dev-server": "^1.10.1" | ||
} | ||
} |
@@ -1,3 +0,3 @@ | ||
import React from 'react/addons'; | ||
import ExecutionEnvironment from 'react/lib/ExecutionEnvironment'; | ||
import React from 'react'; | ||
import TestUtils from 'react-addons-test-utils'; | ||
import jsdom from 'mocha-jsdom'; | ||
@@ -7,4 +7,2 @@ import expect from 'expect'; | ||
let TestUtils = React.addons.TestUtils; | ||
const MOCK = { | ||
@@ -31,3 +29,2 @@ message: 'Test', | ||
jsdom(); | ||
ExecutionEnvironment.canUseDOM = true; | ||
@@ -34,0 +31,0 @@ it('should render message and action text', done => { |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
123963
13
19
347
1
+ Addedobject-assign@3.0.0(transitive)
- Removedreact@^0.13.3
- Removedacorn@5.7.4(transitive)
- Removedamdefine@1.0.1(transitive)
- Removedast-types@0.9.6(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbase62@1.2.8(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedcommander@2.20.3(transitive)
- Removedcommoner@0.10.8(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddefined@1.0.1(transitive)
- Removeddetective@4.7.1(transitive)
- Removedenvify@3.4.1(transitive)
- Removedesprima@3.1.3(transitive)
- Removedesprima-fb@15001.1.0-dev-harmony-fb(transitive)
- Removedglob@5.0.15(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removediconv-lite@0.4.24(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedjstransform@11.0.3(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedobject-assign@2.1.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedprivate@0.1.8(transitive)
- Removedq@1.5.1(transitive)
- Removedreact@0.13.3(transitive)
- Removedrecast@0.11.23(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsource-map@0.4.40.5.7(transitive)
- Removedthrough@2.3.8(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedobject-assign@^3.0.0