diff options
author | rohan09-raj <[email protected]> | 2022-08-26 02:04:49 +0530 |
---|---|---|
committer | rohan09-raj <[email protected]> | 2022-08-26 02:04:56 +0530 |
commit | 951b6dbaf9d3da78c056cafbde17167887f73594 (patch) | |
tree | 1379c3252a2c4636756195ffcb59723243acdfe6 /admin/src/components/Modal | |
parent | 3e354484fb63ac5752cab3415b909a7ed9f0ede4 (diff) |
admin UI fixes
Diffstat (limited to 'admin/src/components/Modal')
-rw-r--r-- | admin/src/components/Modal/Modal.jsx | 78 | ||||
-rw-r--r-- | admin/src/components/Modal/Modal.module.css | 21 |
2 files changed, 99 insertions, 0 deletions
diff --git a/admin/src/components/Modal/Modal.jsx b/admin/src/components/Modal/Modal.jsx new file mode 100644 index 0000000..ffe0167 --- /dev/null +++ b/admin/src/components/Modal/Modal.jsx @@ -0,0 +1,78 @@ +import React from 'react'; +import {Modal, Box} from '@mui/material'; +import styles from './Modal.module.css'; +import Tab from '@mui/material/Tab'; +import TabContext from '@mui/lab/TabContext'; +import TabList from '@mui/lab/TabList'; +import TabPanel from '@mui/lab/TabPanel'; + +const PopUpModal = ({documents, open, setOpen}) => { + const style = { + position: 'absolute', + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + width: 1000, + bgcolor: 'background.paper', + borderRadius: '10px', + boxShadow: 24, + p: 4, + }; + + const [value, setValue] = React.useState('1'); + + const handleChange = (event, newValue) => { + setValue(newValue); + }; + + const handleClose = () => setOpen(false); + + return ( + <div className={styles.modal}> + <Modal + open={open} + onClose={handleClose} + aria-labelledby='modal-modal-title' + aria-describedby='modal-modal-description' + > + <Box sx={style}> + <TabContext value={value}> + <Box sx={{borderBottom: 1, borderColor: 'divider'}}> + <TabList onChange={handleChange}> + <Tab label='Proof of Identity' value='1' /> + <Tab label='Proof of Address' value='2' /> + <Tab label='Proof of Date of Birth' value='3' /> + </TabList> + </Box> + <TabPanel + value='1' + sx={{ + textAlign: 'center', + }} + > + <img src={documents.POI} alt='' /> + </TabPanel> + <TabPanel + value='2' + sx={{ + textAlign: 'center', + }} + > + <img src={documents.POA} alt='' /> + </TabPanel> + <TabPanel + value='3' + sx={{ + textAlign: 'center', + }} + > + <img src={documents.DOB} alt='' /> + </TabPanel> + </TabContext> + </Box> + </Modal> + </div> + ); +}; + +export default PopUpModal; diff --git a/admin/src/components/Modal/Modal.module.css b/admin/src/components/Modal/Modal.module.css new file mode 100644 index 0000000..fd5e327 --- /dev/null +++ b/admin/src/components/Modal/Modal.module.css @@ -0,0 +1,21 @@ +.modal { + margin: 0px 15px; + position: absolute; + top: 100px; + right: 250px; +} + +.modal__title { + text-align: center; + margin: 20px 0px 40px; + font-size: var(--font-medium-large); +} + +.modal__image { + width: 50%; +} + +.modal__content { + width: 50%; + font-size: var(--font-medium-sm); +} |