rev: calender

Deskripsi:
- tampilan list data konflik

No Issues
This commit is contained in:
amel
2025-01-14 11:51:37 +08:00
parent 40a33f8453
commit 3a22a50e57
4 changed files with 154 additions and 3 deletions

View File

@@ -28,6 +28,7 @@ import SkeletonList from "./components/skeleton_list";
import { funViewDir } from "./fun/view_dir";
import { funSendWebPush } from "./fun/send_web_push";
import ViewFilterData from "./view/view_filter_kategori_data";
import LayoutModalNew from "./layout/layout_modal_new";
export { WARNA };
export { LayoutLogin };
@@ -65,3 +66,4 @@ export { keyWibu }
export { funViewDir }
export { funSendWebPush }
export { ViewFilterData }
export { LayoutModalNew }

View File

@@ -0,0 +1,43 @@
import { Button, Flex, Modal, SimpleGrid, Text } from '@mantine/core';
import { useMediaQuery } from '@mantine/hooks';
import { BsQuestionCircleFill } from 'react-icons/bs';
export default function LayoutModalNew({ opened, onClose, description, onYes, loading, onCheck }: { opened: boolean, onClose: () => void, loading?: boolean, description: string, onYes: (val: boolean) => void, onCheck: (val: boolean) => void }) {
const isMobile = useMediaQuery('(max-width: 768px)');
return (
<Modal styles={{
body: {
margin: 10,
},
content: {
border: `2px solid ${'#828AFC'}`,
borderRadius: 10
}
}} opened={opened} onClose={onClose} withCloseButton={false} centered closeOnClickOutside={false}>
<Flex justify={"center"} align={"center"} direction={"column"}>
<BsQuestionCircleFill size={100} color="red" />
<Text mt={30} ta={"center"} fw={"bold"} fz={18}>{description}</Text>
</Flex>
<Button mt={30} fullWidth size="lg" radius={'xl'} bg={'blue'} onClick={() => onCheck(true)}>Lihat Data</Button>
<SimpleGrid mt={10} cols={{ base: 1, sm: 2, lg: 2 }}>
{isMobile ?
<>
<Button loading={loading} fullWidth size="lg" radius={'xl'} bg={'green'} onClick={() => {
onYes(true)
}}>YA</Button>
<Button fullWidth size="lg" radius={'xl'} bg={'#F1C1CF'} c={'#D30B30'} onClick={() => onYes(false)}>TIDAK</Button>
</>
:
<>
<Button fullWidth size="lg" radius={'xl'} bg={'#F1C1CF'} c={'#D30B30'} onClick={() => onYes(false)}>TIDAK</Button>
<Button loading={loading} fullWidth size="lg" radius={'xl'} bg={'green'} onClick={() => {
onYes(true)
}}>YA</Button>
</>
}
</SimpleGrid>
</Modal>
);
}