react-notification
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -126,12 +126,7 @@ var React = require('react'); | ||
componentWillReceiveProps: function (nextProps) { | ||
if (!nextProps.dismissAfter) return; | ||
if (this.state.timeoutId) clearTimeout( this.state.timeoutId ); | ||
this.state.timeoutId = setTimeout( this.hide(), nextProps.dismissAfter ); | ||
this.setState(this.state); | ||
}, | ||
render: function () { | ||
if(this.props.dismissAfter && this.state.active) { | ||
if (this.timeoutId) clearTimeout( this.timeoutId ); | ||
this.timeoutId = setTimeout( this.hide, this.props.dismissAfter ); | ||
} | ||
return ( | ||
@@ -138,0 +133,0 @@ React.createElement("div", {className: "notification-bar", style: this.getBarStyles()}, |
{ | ||
"name": "react-notification", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Snackbar style notification component for React.", | ||
@@ -22,2 +22,3 @@ "main": "dist/notification.js", | ||
"component", | ||
"react-component", | ||
"components", | ||
@@ -24,0 +25,0 @@ "ui", |
@@ -126,12 +126,7 @@ var React = require('react'); | ||
componentWillReceiveProps: function (nextProps) { | ||
if (!nextProps.dismissAfter) return; | ||
if (this.state.timeoutId) clearTimeout( this.state.timeoutId ); | ||
this.state.timeoutId = setTimeout( this.hide(), nextProps.dismissAfter ); | ||
this.setState(this.state); | ||
}, | ||
render: function () { | ||
if(this.props.dismissAfter && this.state.active) { | ||
if (this.timeoutId) clearTimeout( this.timeoutId ); | ||
this.timeoutId = setTimeout( this.hide, this.props.dismissAfter ); | ||
} | ||
return ( | ||
@@ -138,0 +133,0 @@ <div className="notification-bar" style={this.getBarStyles()}> |
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
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
12370
234