Deskripsi: - list data konfigurasi api - edit data konfigurasi api - integrasi api No Issues
38 lines
955 B
TypeScript
38 lines
955 B
TypeScript
import { showNotification } from "@mantine/notifications";
|
|
|
|
export default function notification({ title, message, type }: { title: string, message: string, type: "success" | "error" | "warning" | "info" }) {
|
|
switch (type) {
|
|
case "success":
|
|
return showNotification({
|
|
title,
|
|
message,
|
|
color: "green",
|
|
autoClose: 3000,
|
|
})
|
|
break;
|
|
case "error":
|
|
return showNotification({
|
|
title,
|
|
message,
|
|
color: "red",
|
|
autoClose: 3000,
|
|
})
|
|
break;
|
|
case "warning":
|
|
return showNotification({
|
|
title,
|
|
message,
|
|
color: "orange",
|
|
autoClose: 3000,
|
|
})
|
|
break;
|
|
case "info":
|
|
return showNotification({
|
|
title,
|
|
message,
|
|
color: "blue",
|
|
autoClose: 3000,
|
|
})
|
|
break;
|
|
}
|
|
} |