tanapa env
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import { Center, Text } from "@mantine/core";
|
||||
import { notifications } from "@mantine/notifications";
|
||||
import {
|
||||
IconAlertTriangle,
|
||||
IconChecklist,
|
||||
IconCircleCheck,
|
||||
} from "@tabler/icons-react";
|
||||
|
||||
/**
|
||||
*
|
||||
* @param text | masukan text untuk peringatan
|
||||
* @type string
|
||||
* @param durasi | durasi autoClose
|
||||
* @type number
|
||||
* @returns notifikasi berhasil warna hijau
|
||||
*/
|
||||
export async function ComponentAdminGlobal_NotifikasiBerhasil(
|
||||
text: string,
|
||||
durasi?: number
|
||||
) {
|
||||
return notifications.show({
|
||||
message: (
|
||||
<Center>
|
||||
<Text fw={"bold"}>{text}</Text>
|
||||
</Center>
|
||||
),
|
||||
color: "green",
|
||||
radius: "md",
|
||||
autoClose: durasi ? durasi : 2000,
|
||||
icon: <IconCircleCheck color="white" />,
|
||||
withCloseButton: false,
|
||||
|
||||
styles: (theme) => ({
|
||||
description: { color: theme.white },
|
||||
root: {
|
||||
backgroundColor: theme.colors.green[7],
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { Center, Text } from "@mantine/core";
|
||||
import { notifications } from "@mantine/notifications";
|
||||
import { IconAlertTriangle } from "@tabler/icons-react";
|
||||
|
||||
/**
|
||||
*
|
||||
* @param text | masukan text untuk peringatan
|
||||
* @type string
|
||||
* @returns notifikasi peringatan
|
||||
*/
|
||||
export async function ComponentAdminGlobal_NotifikasiGagal(text: string) {
|
||||
return notifications.show({
|
||||
message: (
|
||||
<Center>
|
||||
<Text fw={"bold"}>{text}</Text>
|
||||
</Center>
|
||||
),
|
||||
color: "red",
|
||||
radius: "md",
|
||||
autoClose: 2000,
|
||||
icon: <IconAlertTriangle color="white" />,
|
||||
withCloseButton: false,
|
||||
|
||||
styles: (theme) => ({
|
||||
description: { color: theme.white },
|
||||
root: {
|
||||
backgroundColor: theme.colors.red[7],
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import { ActionIcon, Avatar, Center, Text } from "@mantine/core";
|
||||
import { notifications } from "@mantine/notifications";
|
||||
import { IconAlertTriangle } from "@tabler/icons-react";
|
||||
|
||||
/**
|
||||
*
|
||||
* @param text | masukan text untuk peringatan
|
||||
* @type string
|
||||
* @returns notifikasi peringatan
|
||||
*/
|
||||
export async function ComponentAdminGlobal_NotifikasiPeringatan(
|
||||
text: string,
|
||||
durasi?: number
|
||||
) {
|
||||
return notifications.show({
|
||||
message: (
|
||||
<Center>
|
||||
<Text fw={"bold"}>{text}</Text>
|
||||
</Center>
|
||||
),
|
||||
color: "yellow.1",
|
||||
radius: "md",
|
||||
autoClose: durasi ? durasi : 2000,
|
||||
style: {
|
||||
borderWidth: "0.5px",
|
||||
borderStyle: "solid",
|
||||
borderColor: "red"
|
||||
|
||||
|
||||
},
|
||||
|
||||
icon: (
|
||||
<ActionIcon variant="transparent" radius={"xl"} p={3}>
|
||||
<IconAlertTriangle
|
||||
color="red"
|
||||
style={{ backgroundColor: "transparent" }}
|
||||
/>
|
||||
</ActionIcon>
|
||||
),
|
||||
withCloseButton: false,
|
||||
|
||||
styles: (theme) => ({
|
||||
description: { color: theme.white },
|
||||
root: {
|
||||
backgroundColor: theme.colors.orange[5],
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user