@airplane/views
Version:
A React library for building Airplane views. Views components are optimized in style and functionality to produce internal apps that are easy to build and maintain.
37 lines (36 loc) • 792 B
JavaScript
import { jsx } from "react/jsx-runtime";
import { showNotification as showNotification$1 } from "@mantine/notifications";
import { XMarkIcon, CheckIcon } from "@airplane/views/icons/index.js";
const showNotification = ({
message,
title,
type,
icon
}) => {
let color;
let notificationIcon;
switch (type) {
case "success":
color = "success";
notificationIcon = /* @__PURE__ */ jsx(CheckIcon, {});
break;
case "error":
color = "error";
notificationIcon = /* @__PURE__ */ jsx(XMarkIcon, {});
break;
}
if (icon) {
notificationIcon = icon;
}
showNotification$1({
message,
title,
color,
icon: notificationIcon,
radius: "lg"
});
};
export {
showNotification
};
//# sourceMappingURL=showNotification.js.map