Files
swiss-datashare/frontend/src/utils/toast.util.tsx

28 lines
499 B
TypeScript
Raw Normal View History

2022-04-25 15:15:17 +02:00
import { showNotification } from "@mantine/notifications";
import { Check, X } from "tabler-icons-react";
const error = (message: string) =>
showNotification({
icon: <X />,
color: "red",
radius: "md",
title: "Error",
2022-05-06 10:25:10 +02:00
2022-04-25 15:15:17 +02:00
message: message,
});
const success = (message: string) =>
showNotification({
icon: <Check />,
color: "green",
radius: "md",
title: "Success",
message: message,
});
const toast = {
error,
success,
};
export default toast;