tambahan untuk divisi
This commit is contained in:
33
src/module/division/lib/BottomMenu.tsx
Normal file
33
src/module/division/lib/BottomMenu.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { ActionIcon, Drawer, Flex, Stack, Text } from "@mantine/core";
|
||||
import { MdClose } from "react-icons/md";
|
||||
|
||||
export function BottomMenu({size, title, openDrawer, setOpenDrawer, children }: { size?: number | string, title?: string, openDrawer: boolean, setOpenDrawer: any, children: React.ReactNode }) {
|
||||
return <Drawer
|
||||
p={0}
|
||||
opened={openDrawer}
|
||||
onClose={() => setOpenDrawer(false)}
|
||||
position="bottom"
|
||||
withCloseButton={false}
|
||||
size={size || "md"}
|
||||
styles={{
|
||||
content: {
|
||||
margin: "0 auto",
|
||||
maxWidth: 550,
|
||||
borderTopRightRadius: 20,
|
||||
borderTopLeftRadius: 20
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Stack gap={"md"}>
|
||||
<Flex justify="space-between">
|
||||
<Flex justify={"end"}>
|
||||
<Text>{title || 'Menu'}</Text>
|
||||
</Flex>
|
||||
<ActionIcon onClick={() => setOpenDrawer(false)} variant="subtle">
|
||||
<MdClose />
|
||||
</ActionIcon>
|
||||
</Flex>
|
||||
{children}
|
||||
</Stack>
|
||||
</Drawer>
|
||||
}
|
||||
Reference in New Issue
Block a user