Rev 3570 | Rev 3716 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React from 'react';
import { Box, Modal as MuiModal } from '@mui/material';
import { useModal } from '@shared/hooks';
import { Card, CardHeader, CardContent } from './card';
export function Modal() {
const { show, title, content, closeModal } = useModal();
return (
<MuiModal open={show} onClose={closeModal}>
<Box
sx={{
position: 'absolute',
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
display: 'flex',
justifyContent: 'center',
alignItems: 'center'
}}
>
<Card styles={{ width: '100%', maxWidth: { xs: '90vw', md: '500px', lg: '800px' } }}>
<CardHeader title={title} />
<CardContent styles={{ maxHeight: '70vh', overflowY: 'auto' }}>{content}</CardContent>
</Card>
</Box>
</MuiModal>
);
}