#fix: bug
- Desk: - Perbaikan penempatan file ## No issuee
This commit is contained in:
40
src/app_modules/_global/notif_global/notifikasi_berhasil.tsx
Normal file
40
src/app_modules/_global/notif_global/notifikasi_berhasil.tsx
Normal file
@@ -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 ComponentGlobal_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],
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user