react-redux-toastr
Advanced tools
Comparing version 7.5.2 to 7.6.0
@@ -223,2 +223,5 @@ "use strict"; | ||
closeOnToastrClick: false, | ||
getState: function getState(state) { | ||
return state.toastr; | ||
}, | ||
confirmOptions: { | ||
@@ -230,5 +233,5 @@ okText: 'ok', | ||
var _default = (0, _reactRedux.connect)(function (state) { | ||
var _default = (0, _reactRedux.connect)(function (state, ownProps) { | ||
return { | ||
toastr: state.toastr ? state.toastr : state.get('toastr') | ||
toastr: ownProps.getState(state) | ||
}; | ||
@@ -235,0 +238,0 @@ }, actions)(ReduxToastr); |
{ | ||
"name": "react-redux-toastr", | ||
"version": "7.5.2", | ||
"version": "7.6.0", | ||
"description": "react-redux-toastr is a React toastr message implemented with Redux", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -69,2 +69,3 @@ ## `react-redux-toastr` [demo](http://diegoddox.github.io/react-redux-toastr/) | ||
position="top-left" | ||
getState={(state) => state.toastr} // This is the default | ||
transitionIn="fadeIn" | ||
@@ -71,0 +72,0 @@ transitionOut="fadeOut" |
@@ -37,2 +37,3 @@ import React from 'react'; | ||
closeOnToastrClick: false, | ||
getState: (state) => state.toastr, | ||
confirmOptions: { | ||
@@ -159,6 +160,6 @@ okText: 'ok', | ||
export default connect( | ||
state => ({ | ||
toastr: state.toastr ? state.toastr : state.get('toastr') | ||
(state, ownProps) => ({ | ||
toastr: ownProps.getState(state), | ||
}), | ||
actions | ||
)(ReduxToastr); |
154156
2548
348