mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-29 09:18:59 +02:00
27 lines
494 B
TypeScript
27 lines
494 B
TypeScript
|
|
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",
|
||
|
|
message: message,
|
||
|
|
});
|
||
|
|
|
||
|
|
const success = (message: string) =>
|
||
|
|
showNotification({
|
||
|
|
icon: <Check />,
|
||
|
|
color: "green",
|
||
|
|
radius: "md",
|
||
|
|
title: "Success",
|
||
|
|
message: message,
|
||
|
|
});
|
||
|
|
|
||
|
|
const toast = {
|
||
|
|
error,
|
||
|
|
success,
|
||
|
|
};
|
||
|
|
export default toast;
|