UNPKG

@talend/react-containers

Version:

Provide connected components aka containers for @talend/react-cmf based on @talend/react-components.

59 lines (55 loc) 1.47 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.pushError = pushError; exports.pushGeneric = pushGeneric; exports.pushInfo = pushInfo; exports.pushWarning = pushWarning; var _Notification = _interopRequireDefault(require("./Notification.constants")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /** * Action to push a generic notification * @param {Object} notification Notification to push * @returns {Object} */ function pushGeneric(notification) { return { type: _Notification.default.PUSH_NOTIFICATION, notification }; } /** * Action to specifically push an info notification * @param {Object} notification Notification to push * @returns {Object} */ function pushInfo(notification) { return pushGeneric({ ...notification, type: _Notification.default.TYPE_INFO }); } /** * Action to specifically push a warning notification * @param {Object} notification Notification to push * @returns {Object} */ function pushWarning(notification) { return pushGeneric({ ...notification, type: _Notification.default.TYPE_WARNING }); } /** * Action to specifically push an error notification * @param {Object} notification Notification to push * @returns {Object} */ function pushError(notification) { return pushGeneric({ ...notification, type: _Notification.default.TYPE_ERROR }); } //# sourceMappingURL=Notification.actions.js.map