mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 07:04:53 +09:00
16 lines
409 B
React
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)
|
|
}
|