Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 3715 | Rev 3717 | 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={{
3716 stevensc 14
          position: 'fixed',
3470 stevensc 15
          top: '50%',
16
          left: '50%',
3478 stevensc 17
          transform: 'translate(-50%, -50%)',
3526 stevensc 18
          display: 'flex',
19
          justifyContent: 'center',
3716 stevensc 20
          alignItems: 'center',
21
          width: '100%',
22
          height: '100%'
3470 stevensc 23
        }}
24
      >
3715 stevensc 25
        <Card styles={{ width: '100%', maxWidth: { xs: '90vw', md: '500px', lg: '800px' } }}>
3526 stevensc 26
          <CardHeader title={title} />
3570 stevensc 27
          <CardContent styles={{ maxHeight: '70vh', overflowY: 'auto' }}>{content}</CardContent>
3526 stevensc 28
        </Card>
29
      </Box>
3470 stevensc 30
    </MuiModal>
31
  );
32
}