mirror of
https://github.com/getredash/redash.git
synced 2026-03-21 07:00:07 -04:00
* 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
22 lines
542 B
JavaScript
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,
|
|
};
|