Update Add Input Hospital Portal

This commit is contained in:
ivan-sim
2026-02-10 10:03:28 +07:00
parent f10589eb85
commit 8084a83c3d
31 changed files with 5674 additions and 86 deletions

View File

@@ -0,0 +1,58 @@
import Iconify from '@/components/Iconify';
import MenuPopover from './MenuPopover';
import { IconButton, MenuItem } from '@mui/material';
import { useEffect, useState } from 'react';
// ----------------------------------------------------------------------
type Props = {
actions: React.ReactNode;
};
export default function MoreMenu({ actions }: Props) {
const [open, setOpen] = useState<HTMLElement | null>(null);
// Close menu popover
useEffect(() => {
setOpen(null);
}, [actions])
const handleOpen = (event: React.MouseEvent<HTMLElement>) => {
setOpen(event.currentTarget);
};
const handleClose = () => {
setOpen(null);
};
return (
<>
<IconButton onClick={handleOpen}>
<Iconify icon={'eva:more-vertical-fill'} width={20} height={20} />
</IconButton>
<MenuPopover
open={Boolean(open)}
anchorEl={open}
onClose={handleClose}
anchorOrigin={{ vertical: 'top', horizontal: 'left' }}
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
arrow="right-top"
sx={{
mt: -1,
width: 'auto',
minWidth: 160,
'& .MuiMenuItem-root': {
px: 1,
typography: 'body2',
borderRadius: 0.75,
'& svg': { mr: 2, width: 20, height: 20 },
},
}}
>
{actions}
</MenuPopover>
</>
);
}