Files
factorio-clusterio/packages/master/web/util/notify.jsx
T
Danielv123 2382f4bbdc Import web interface from clusterio/clusterioWeb
Import the source files in use for the web interface, excluding the
copied and modified lib/link files.
2020-09-28 04:19:00 +02:00

16 lines
418 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)
}