react-notification
Advanced tools
Comparing version 6.6.0 to 6.6.1
@@ -5,3 +5,3 @@ :wave: Hi! If you switch to "Preview" mode (using the button above), this is easier to read and you can click on links. This template exists to help you create an issue that is both valuable to you and to the GitHub community. | ||
:point_right: **Have a feature request?** [Read this](https://github.com/pburtchaell/react-notification/blob/master/.github/CONTRIBUTING.md#have-a-feature-request). | ||
:point_right: **Need help?** [Read this](https://github.com/pburtchaell/react-notification/blob/master/.github/CONTRIBUTING.md#need-help). | ||
:point_right: **Need help?** [Read this](https://github.com/pburtchaell/react-notification/blob/master/.github/CONTRIBUTING.md#need-help-raising_hand). | ||
@@ -8,0 +8,0 @@ If you delete this template and do not provide the information we need to resolve your issue, *your issue will be closed* and you will be redirected to the contributing guide. :skull: |
@@ -7,18 +7,23 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.default = { | ||
message: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.element]).isRequired, | ||
action: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.string, _react.PropTypes.node]), | ||
onClick: _react.PropTypes.func, | ||
style: _react.PropTypes.bool, | ||
actionStyle: _react.PropTypes.object, | ||
barStyle: _react.PropTypes.object, | ||
activeBarStyle: _react.PropTypes.object, | ||
dismissAfter: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.number]), | ||
onDismiss: _react.PropTypes.func, | ||
className: _react.PropTypes.string, | ||
activeClassName: _react.PropTypes.string, | ||
isActive: _react.PropTypes.bool, | ||
title: _react.PropTypes.string | ||
message: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.element]).isRequired, | ||
action: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.string, _propTypes2.default.node]), | ||
onClick: _propTypes2.default.func, | ||
style: _propTypes2.default.bool, | ||
actionStyle: _propTypes2.default.object, | ||
titleStyle: _propTypes2.default.object, | ||
barStyle: _propTypes2.default.object, | ||
activeBarStyle: _propTypes2.default.object, | ||
dismissAfter: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.number]), | ||
onDismiss: _propTypes2.default.func, | ||
className: _propTypes2.default.string, | ||
activeClassName: _propTypes2.default.string, | ||
isActive: _propTypes2.default.bool, | ||
title: _propTypes2.default.string | ||
}; |
@@ -14,2 +14,6 @@ 'use strict'; | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
var _stackedNotification = require('./stackedNotification'); | ||
@@ -69,11 +73,10 @@ | ||
/* eslint-disable react/no-unused-prop-types, react/forbid-prop-types */ | ||
NotificationStack.propTypes = { | ||
activeBarStyleFactory: _react.PropTypes.func, | ||
barStyleFactory: _react.PropTypes.func, | ||
dismissInOrder: _react.PropTypes.bool, | ||
notifications: _react.PropTypes.array.isRequired, | ||
onDismiss: _react.PropTypes.func.isRequired, | ||
onClick: _react.PropTypes.func, | ||
action: _react.PropTypes.string | ||
activeBarStyleFactory: _propTypes2.default.func, | ||
barStyleFactory: _propTypes2.default.func, | ||
dismissInOrder: _propTypes2.default.bool, | ||
notifications: _propTypes2.default.array.isRequired, | ||
onDismiss: _propTypes2.default.func.isRequired, | ||
onClick: _propTypes2.default.func, | ||
action: _propTypes2.default.string | ||
}; | ||
@@ -88,5 +91,4 @@ | ||
}; | ||
/* eslint-enable no-alert, no-console */ | ||
exports.default = NotificationStack; |
@@ -15,2 +15,3 @@ ### Props | ||
| actionStyle | object | Custom action styles | | | | ||
| titleStyle | object | Custom title styles | | | | ||
| className | string | Custom class to apply to the top-level component | | | | ||
@@ -17,0 +18,0 @@ | activeClassName | string | Custom class to apply to the top-level component when active| | `'notification-bar-active'`| |
{ | ||
"name": "react-notification", | ||
"version": "6.6.0", | ||
"version": "6.6.1", | ||
"description": "Snackbar style notification component for React", | ||
@@ -44,14 +44,14 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"babel-cli": "^6.6.5", | ||
"babel-core": "^6.7.2", | ||
"babel-eslint": "^7.1.1", | ||
"babel-loader": "^6.2.4", | ||
"babel-plugin-transform-object-assign": "^6.8.0", | ||
"babel-preset-es2015": "^6.6.0", | ||
"babel-preset-react": "^6.5.0", | ||
"babel-preset-stage-0": "^6.5.0", | ||
"babel-cli": "^6.24.1", | ||
"babel-core": "^6.24.1", | ||
"babel-eslint": "^7.2.2", | ||
"babel-loader": "^6.4.1", | ||
"babel-plugin-transform-object-assign": "^6.22.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"chai": "^3.5.0", | ||
"chai-enzyme": "^0.6.0", | ||
"cheerio": "^0.22.0", | ||
"enzyme": "^2.1.0", | ||
"enzyme": "^2.8.2", | ||
"eslint": "^3.10.2", | ||
@@ -62,17 +62,21 @@ "eslint-config-airbnb": "^13.0.0", | ||
"eslint-plugin-react": "^6.7.1", | ||
"express": "^4.13.4", | ||
"express": "^4.15.2", | ||
"express-urlrewrite": "^1.2.0", | ||
"html-webpack-plugin": "^2.10.0", | ||
"html-webpack-plugin": "^2.28.0", | ||
"immutable": "^3.8.1", | ||
"jsdom": "^9.8.3", | ||
"mocha": "^3.1.2", | ||
"pre-commit": "^1.1.3", | ||
"react": "^15.0.0", | ||
"react-addons-test-utils": "^15.0.0", | ||
"react-dom": "^15.0.0", | ||
"jsdom": "^9.12.0", | ||
"mocha": "^3.2.0", | ||
"pre-commit": "^1.2.2", | ||
"react": "^15.5.4", | ||
"react-dom": "^15.5.4", | ||
"react-test-renderer": "^15.5.4", | ||
"sinon": "^1.17.3", | ||
"webpack": "^1.12.14", | ||
"webpack-dev-middleware": "^1.5.1", | ||
"webpack-dev-middleware": "^1.10.1", | ||
"webpack-dev-server": "^1.14.1" | ||
}, | ||
"dependencies": { | ||
"prop-types": "^15.5.8", | ||
"react-addons-test-utils": "^15.5.1" | ||
} | ||
} |
@@ -7,3 +7,3 @@ # React Notification | ||
React Notification is a component designed to provide snackbar notification messages and notification stacks. The default visual style and interaction follows [Material Design guidelines for snackbards](http://www.google.com/design/spec/components/snackbars-toasts.html#snackbars-toasts-usage), but it can be fully customized. | ||
React Notification is a component designed to provide snackbar notification messages and notification stacks. The default visual style and interaction follows [Material Design guidelines for snackbars](http://www.google.com/design/spec/components/snackbars-toasts.html#snackbars-toasts-usage), but it can be fully customized. | ||
@@ -10,0 +10,0 @@ ## Docs and Help |
@@ -83,2 +83,20 @@ import React from 'react'; | ||
it('should fire onClick with argument `deactivate`', (done) => { | ||
const wrapper = mount( | ||
<NotificationStack | ||
notifications={[{ | ||
...mockNotification, | ||
onClick: (notification, deactivate) => { | ||
expect(deactivate).to.be.a('function'); | ||
done(); | ||
} | ||
}]} | ||
onDismiss={() => null} | ||
/> | ||
); | ||
const notification = wrapper.find('.notification-bar-action'); | ||
notification.simulate('click'); | ||
}); | ||
it('should dismiss when `dismissAfter` is updated to a number after it was `false`', (done) => { | ||
@@ -85,0 +103,0 @@ const handleDismiss = spy(); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
533643
1097
3
1
+ Addedprop-types@^15.5.8
+ Addedreact-addons-test-utils@15.6.2(transitive)
+ Addedreact-dom@15.7.0(transitive)