Socket
Socket
Sign inDemoInstall

react-redux-toastr

Package Overview
Dependencies
Maintainers
1
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-redux-toastr - npm Package Compare versions

Comparing version 3.1.4 to 3.2.0

README.md

3

CHANGELOG.md

@@ -0,1 +1,4 @@

#3.1.4
Add the font-icons to the lib folder.
#3.0.0

@@ -2,0 +5,0 @@ Remove `dangerouslysetinnerhtml` and implment `component` `option`.

16

lib/ToastrBox.js

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

this._setTransition();
(0, _utils.onCSSTransitionEnd)(this.toastrBox, this._onAnimationComplite);
(0, _utils.onCSSTransitionEnd)(this.toastrBox, this._onAnimationComplete);
};

@@ -124,3 +124,3 @@

{ className: 'message' },
_react2.default.createElement(this.props.item.options.component, null)
this._renderSubComponent(this.props.item.options.component)
)

@@ -142,3 +142,3 @@ )

this._onAnimationComplite = function () {
this._onAnimationComplete = function () {
var _props = _this3.props;

@@ -166,3 +166,3 @@ var remove = _props.remove;

_this3._setTransition(true);
(0, _utils.onCSSTransitionEnd)(_this3.toastrBox, _this3._onAnimationComplite);
(0, _utils.onCSSTransitionEnd)(_this3.toastrBox, _this3._onAnimationComplete);
}

@@ -198,4 +198,12 @@ };

};
this._renderSubComponent = function (SubComponent) {
// If SubComponent is already a valid React element, just render it.
if ((0, _react.isValidElement)(SubComponent)) return SubComponent;
// If SubComponent is a class reference, create a React element from it
return _react2.default.createElement(SubComponent, null);
};
};
exports.default = ToastrBox;
{
"name": "react-redux-toastr",
"version": "3.1.4",
"version": "3.2.0",
"description": "react-redux-toastr is a React toastr message implemented with Redux",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

import CSSCore from 'fbjs/lib/CSSCore';
import React, {Component, PropTypes, dangerouslySetInnerHTML} from 'react'; // eslint-disable-line no-unused-vars
import React, {Component, PropTypes, isValidElement} from 'react'; // eslint-disable-line no-unused-vars
import cn from 'classnames';

@@ -36,3 +36,3 @@

this._setTransition();
onCSSTransitionEnd(this.toastrBox, this._onAnimationComplite);
onCSSTransitionEnd(this.toastrBox, this._onAnimationComplete);
}

@@ -62,3 +62,3 @@

_onAnimationComplite = () => {
_onAnimationComplete = () => {
const {remove, item} = this.props;

@@ -82,3 +82,3 @@ const {options, id} = item;

this._setTransition(true);
onCSSTransitionEnd(this.toastrBox, this._onAnimationComplite);
onCSSTransitionEnd(this.toastrBox, this._onAnimationComplete);
}

@@ -115,2 +115,12 @@ };

_renderSubComponent = (SubComponent) => {
// If SubComponent is already a valid React element, just render it.
if (isValidElement(SubComponent)) return SubComponent;
// If SubComponent is a class reference, create a React element from it
return (
<SubComponent />
);
};
render() {

@@ -129,3 +139,3 @@ return (

<div className="message">
<this.props.item.options.component />
{this._renderSubComponent(this.props.item.options.component)}
</div>

@@ -132,0 +142,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