New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-notification

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-notification - npm Package Compare versions

Comparing version 2.2.1 to 2.3.0

18

dist/notification.js

@@ -137,3 +137,3 @@ 'use strict';

if (nextProps.onDismiss && nextProps.isActive) {
setTimeout(nextProps.onDismiss, this.props.dismissAfter);
setTimeout(nextProps.onDismiss, nextProps.dismissAfter);
}

@@ -148,5 +148,10 @@ };

Notification.prototype.render = function render() {
var className = 'notification-bar';
if (this.props.isActive) className += ' ' + this.props.activeClassName;
if (this.props.className) className += ' ' + this.props.className;
return _react2['default'].createElement(
'div',
{ className: 'notification-bar', style: this.getBarStyle() },
{ className: className, style: this.getBarStyle() },
_react2['default'].createElement(

@@ -173,7 +178,9 @@ 'div',

message: _react.PropTypes.string.isRequired,
action: _react.PropTypes.string.isRequired,
action: _react.PropTypes.oneOfType([_react.PropTypes.bool, _react.PropTypes.string]),
onClick: _react.PropTypes.func,
styles: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.bool]),
dismissAfter: _react.PropTypes.number,
onDismis: _react.PropTypes.func
onDismis: _react.PropTypes.func,
className: _react.PropTypes.string,
activeClassName: _react.PropTypes.string
},

@@ -185,3 +192,4 @@ enumerable: true

isActive: false,
dismissAfter: 2000
dismissAfter: 2000,
activeClassName: 'notification-bar-active'
},

@@ -188,0 +196,0 @@ enumerable: true

{
"name": "react-notification",
"version": "2.2.1",
"version": "2.3.0",
"description": "Snackbar style notification component for React.",

@@ -5,0 +5,0 @@ "main": "dist/notification.js",

@@ -36,2 +36,4 @@ # react-notification [![npm version](https://badge.fury.io/js/react-notification.svg)](http://badge.fury.io/js/react-notification) [![Dependency Status](https://david-dm.org/pburtchaell/react-classes.svg)](https://david-dm.org/pburtchaell/react-notification)

| style | object or boolean | Custom styles to apply to the component* | | |
| className | string | Custom class to apply to the top-level component | | |
| activeClassName | string | Custom class to apply to the top-level component when active | | |
| dismissAfter | number | Timeout for onDismiss event | | `2000` |

@@ -38,0 +40,0 @@

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