#fix: bug
- Desk: - Perbaikan penempatan file ## No issuee
This commit is contained in:
52
src/app_modules/_global/component/box_information.tsx
Normal file
52
src/app_modules/_global/component/box_information.tsx
Normal file
@@ -0,0 +1,52 @@
|
||||
import { Center, Grid, Group, Paper, Stack, Text, Title } from "@mantine/core";
|
||||
import { AccentColor, MainColor } from "../color/color_pallet";
|
||||
|
||||
export default function ComponentGlobal_BoxInformation({
|
||||
informasi,
|
||||
isReport,
|
||||
}: {
|
||||
informasi: string;
|
||||
isReport?: boolean;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
{isReport ? (
|
||||
<Paper
|
||||
bg={"blue.3"}
|
||||
p={10}
|
||||
style={{
|
||||
backgroundColor: AccentColor.blue,
|
||||
border: `1px solid ${AccentColor.skyblue}`,
|
||||
}}
|
||||
>
|
||||
<Stack spacing={0}>
|
||||
<Text fz={10} fs={"italic"} c={"orange"} fw={"bold"}>
|
||||
* Report
|
||||
</Text>
|
||||
<Text fz={10} c={"white"}>
|
||||
{informasi}
|
||||
</Text>
|
||||
</Stack>
|
||||
</Paper>
|
||||
) : (
|
||||
<Paper
|
||||
bg={"blue.3"}
|
||||
p={10}
|
||||
style={{
|
||||
backgroundColor: AccentColor.blue,
|
||||
border: `1px solid ${AccentColor.skyblue}`,
|
||||
}}
|
||||
>
|
||||
<Group>
|
||||
<Text fz={10} c={"red"} fw={"bold"}>
|
||||
*{" "}
|
||||
<Text span inherit c={"white"} fw={"normal"}>
|
||||
{informasi}
|
||||
</Text>
|
||||
</Text>
|
||||
</Group>
|
||||
</Paper>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
25
src/app_modules/_global/component/error_input.tsx
Normal file
25
src/app_modules/_global/component/error_input.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
"use client";
|
||||
|
||||
import { Group, Text } from "@mantine/core";
|
||||
import { IconAlertTriangle } from "@tabler/icons-react";
|
||||
|
||||
export default function ComponentGlobal_ErrorInput({
|
||||
max,
|
||||
text,
|
||||
color,
|
||||
}: {
|
||||
max?: number;
|
||||
text?: string;
|
||||
color?: string;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Group spacing={"xs"}>
|
||||
<IconAlertTriangle size={15} color={color ? color : "red"} />
|
||||
<Text fz={10} fs={"italic"} color={color ? color : "red"}>
|
||||
{text ? text : ` Maksimal ${max ? max : "-"} karakter !`}
|
||||
</Text>
|
||||
</Group>
|
||||
</>
|
||||
);
|
||||
}
|
||||
23
src/app_modules/_global/component/input_countdown.tsx
Normal file
23
src/app_modules/_global/component/input_countdown.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
"use client";
|
||||
|
||||
import { Text } from "@mantine/core";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function ComponentGlobal_InputCountDown({
|
||||
maxInput,
|
||||
lengthInput,
|
||||
}: {
|
||||
maxInput: number;
|
||||
lengthInput: number;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Text fz={"xs"} fs={"italic"} color="gray">
|
||||
{maxInput - lengthInput < 0 ? 0 : maxInput - lengthInput} /{" "}
|
||||
<Text span inherit c={maxInput - lengthInput < 0 ? "red" : ""} style={{transition: "0.5s"}}>
|
||||
{maxInput}
|
||||
</Text>
|
||||
</Text>
|
||||
</>
|
||||
);
|
||||
}
|
||||
23
src/app_modules/_global/component/is_empty_data.tsx
Normal file
23
src/app_modules/_global/component/is_empty_data.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
"use client";
|
||||
|
||||
import { Center, Text } from "@mantine/core";
|
||||
|
||||
export default function ComponentGlobal_IsEmptyData({
|
||||
text,
|
||||
height,
|
||||
}: {
|
||||
text?: string;
|
||||
height?: number;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Center
|
||||
h={height ? `${height}vh` : "70vh"}
|
||||
fz={"sm"}
|
||||
fw={"bold"}
|
||||
>
|
||||
<Text c={"gray"}>{text ? text : "Tidak Ada Data"}</Text>
|
||||
</Center>
|
||||
</>
|
||||
);
|
||||
}
|
||||
10
src/app_modules/_global/component/loader.tsx
Normal file
10
src/app_modules/_global/component/loader.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Loader } from "@mantine/core";
|
||||
import { MainColor } from "../color/color_pallet";
|
||||
|
||||
export default function ComponentGlobal_Loader({ size }: { size?: number }) {
|
||||
return (
|
||||
<>
|
||||
<Loader color={MainColor.yellow} size={size ? size : 20} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
18
src/app_modules/_global/component/waring_popup.ts
Normal file
18
src/app_modules/_global/component/waring_popup.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { ComponentGlobal_NotifikasiPeringatan } from "../notif_global/notifikasi_peringatan";
|
||||
|
||||
/**
|
||||
* @returns nilai maksimal untuk upload file di semua module
|
||||
*/
|
||||
export let maksimalUploadFile = 2000000;
|
||||
export const ComponentGlobal_WarningMaxUpload = ({
|
||||
text,
|
||||
time,
|
||||
}: {
|
||||
text?: string;
|
||||
time?: number;
|
||||
}) => {
|
||||
ComponentGlobal_NotifikasiPeringatan(
|
||||
text ? text : "Maaf, Ukuran file terlalu besar, maximum 2mb",
|
||||
time ? time : 3000
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user