react-admin-ui
Version:
React Admin Panel based on material-ui interface Edit
31 lines (26 loc) • 718 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.close = exports.open = undefined;
var _constants = require('../constants');
var open = function open(key, message) {
var time = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1000;
return function (dispatch) {
dispatch({
type: _constants.SNACKBAR_OPEN,
meta: { key: key, time: time },
payload: message
});
};
};
var close = function close(key) {
return function (dispatch) {
dispatch({
type: _constants.SNACKBAR_CLOSE,
meta: { key: key }
});
};
};
exports.open = open;
exports.close = close;