Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3526 | Rev 3715 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
3470 stevensc 1
import React from 'react';
3526 stevensc 2
import { Box, Modal as MuiModal } from '@mui/material';
3470 stevensc 3
 
4
import { useModal } from '@shared/hooks';
5
import { Card, CardHeader, CardContent } from './card';
6
 
7
export function Modal() {
8
  const { show, title, content, closeModal } = useModal();
9
 
10
  return (
11
    <MuiModal open={show} onClose={closeModal}>
3526 stevensc 12
      <Box
13
        sx={{
3470 stevensc 14
          position: 'absolute',
15
          top: '50%',
16
          left: '50%',
3478 stevensc 17
          transform: 'translate(-50%, -50%)',
3526 stevensc 18
          display: 'flex',
19
          justifyContent: 'center',
20
          alignItems: 'center'
3470 stevensc 21
        }}
22
      >
3570 stevensc 23
        <Card styles={{ width: '100%', maxWidth: { xs: '80vw', md: '500px', lg: '800px' } }}>
3526 stevensc 24
          <CardHeader title={title} />
3570 stevensc 25
          <CardContent styles={{ maxHeight: '70vh', overflowY: 'auto' }}>{content}</CardContent>
3526 stevensc 26
        </Card>
27
      </Box>
3470 stevensc 28
    </MuiModal>
29
  );
30
}