Files
redash/client/app/services/notification.js
Arik Fraimovich 56d3be2248 Prettier all the Javascript code & GitHub Action (#4433)
* Prettier all the JS files

* Add GitHub Action to autoformat code pushed to master

* Fix eslint violation due to formatting.

* Remove GitHub actions for styling

* Add restyled.io config
2019-12-11 17:05:38 +02:00

22 lines
542 B
JavaScript

import notification from "antd/lib/notification";
notification.config({
placement: "bottomRight",
duration: 3,
});
const simpleNotification = {};
["success", "error", "info", "warning", "warn"].forEach(action => {
// eslint-disable-next-line arrow-body-style
simpleNotification[action] = (message, description = null, props = null) => {
return notification[action]({ ...props, message, description });
};
});
export default {
// export Ant's notification and replace actions
...notification,
...simpleNotification,
};