style : update module

Deskripsi:
- add global
- add users

No issue
This commit is contained in:
lukman
2024-07-08 12:32:36 +08:00
parent e2d9763a1d
commit 7d70fd2ce7
7 changed files with 139 additions and 73 deletions

View File

@@ -5,6 +5,7 @@ import LoadingPage from "./layout/layout_loading_page";
import LayoutLogin from "./layout/layout_login";
import LayoutNavbarHome from "./layout/layout_navbar_home";
import { isDrawer } from "./val/isDrawer";
import { isModal } from "./val/isModal";
export { WARNA }
export { LayoutLogin }
@@ -12,4 +13,5 @@ export { LayoutNavbarHome }
export { LayoutIconBack }
export { LoadingPage }
export { LayoutDrawer }
export { isDrawer }
export { isDrawer }
export { isModal }

View File

@@ -0,0 +1,30 @@
import { useHookstate } from '@hookstate/core';
import { Box, Button, Flex, Modal, Text } from '@mantine/core';
import React from 'react';
import { BsQuestionCircleFill } from 'react-icons/bs';
import { isModal } from '../val/isModal';
export default function LayoutModal({ opened, onClose, description, onYes }: { opened: boolean, onClose: () => void, description: string, onYes: (val: boolean) => void }) {
const openModal = useHookstate(isModal)
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>
<Box mt={30} w={'100%'}>
<Button mb={20} fullWidth size="lg" radius={'xl'} bg={'#4754F0'} onClick={() => onYes(true)}>YA</Button>
<Button fullWidth size="lg" radius={'xl'} bg={'#DCE1FE'} c={'#4754F0'} onClick={() => openModal.set(false)}>TIDAK</Button>
</Box>
</Flex>
</Modal>
);
}

View File

@@ -0,0 +1,4 @@
'use client'
import { hookstate } from '@hookstate/core';
export const isModal = hookstate(false)