-
Notifications
You must be signed in to change notification settings - Fork 1
/
PrimaryKeyErrorPopup.tsx
41 lines (37 loc) · 988 Bytes
/
PrimaryKeyErrorPopup.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { Modal, Box, Typography, Button } from '@mui/material';
const style = {
position: "absolute",
margin: "auto",
padding: 3,
top: "50%",
left: "50%",
transform: "translate(-50%, -50%)",
width: "auto",
bgcolor: "#f1f1f1",
border: "2px solid #000",
borderRadius: 8,
boxShadow: 24,
p: 4,
};
const buttonStyle = {
marginRight: 10,
backgroundColor: "#404040",
};
const InfoPopup = ({ open, message, onClose }) => {
return (
<Modal open={open} onClose={onClose} aria-labelledby="info-popup-title">
<Box sx={style}>
<Typography id="info-popup-title" variant="h6" component="h2">
Information
</Typography>
<Typography sx={{ mt: 2 }}>
{message}
</Typography>
<Button variant="contained" style={buttonStyle} onClick={onClose}>
Close
</Button>
</Box>
</Modal>
);
};
export default InfoPopup;