Files
factorio-clusterio/packages/master/web/util/notify.jsx
T
Hornwitser 8dce1dd0fd Fix web interface indents
Use project standard of tabs for indents.
2020-09-28 05:51:15 +02:00

16 lines
409 B
React

import { notification } from "antd";
/**
*
* @param {string} message
* @param {("info"|"error"|"success"|"warning"|"warn")} type
*/
export default function notify(message, type = "info", description) {
notification[type]({
message: typeof message === "string" ? message : "ERROR: See console",
description,
placement: "bottomRight",
});
if (typeof message !== "string") console.error(message)
}