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
3692 stevensc 1
import React from 'react';
2
import { Box, Button, Modal, Typography } from '@mui/material';
3
 
4
import { useAlertModal } from '@shared/hooks';
5
 
6
import { Card, CardActions, CardContent, CardHeader } from './card';
7
 
8
export function AlertModal() {
9
  const { show, title, message, closeAlert, onConfirm, onCancel } = useAlertModal();
10
 
11
  return (
12
    <Modal open={show} onClose={closeAlert}>
13
      <Box
14
        sx={{
3716 stevensc 15
          position: 'fixed',
3692 stevensc 16
          top: '50%',
17
          left: '50%',
18
          transform: 'translate(-50%, -50%)',
19
          display: 'flex',
20
          justifyContent: 'center',
3716 stevensc 21
          alignItems: 'center',
22
          width: '100%',
23
          height: '100%'
3692 stevensc 24
        }}
25
      >
3715 stevensc 26
        <Card styles={{ width: '100%', maxWidth: { xs: '90vw', md: '500px', lg: '800px' } }}>
3692 stevensc 27
          <CardHeader title={title} />
28
          <CardContent>
29
            <Typography variant='h2'>{message}</Typography>
30
          </CardContent>
31
 
32
          <CardActions>
33
            <Button variant='contained' color='primary' onClick={onConfirm}>
34
              Confirmar
35
            </Button>
36
            <Button variant='contained' color='primary' onClick={onCancel}>
37
              Cancelar
38
            </Button>
39
          </CardActions>
40
        </Card>
41
      </Box>
42
    </Modal>
43
  );
44
}