init: Init React Application

This commit is contained in:
2025-05-29 13:21:33 +03:00
parent 9444939507
commit 17de7e495f
66 changed files with 10425 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
import { Modal as MuiModal, Typography, Box } from "@mui/material";
interface ModalProps {
open: boolean;
onClose: () => void;
children: React.ReactNode;
title?: string;
}
const style = {
position: "absolute" as const,
top: "50%",
left: "50%",
transform: "translate(-50%, -50%)",
width: 400,
bgcolor: "background.paper",
boxShadow: 24,
p: 4,
borderRadius: 2,
};
export const Modal = ({ open, onClose, children, title }: ModalProps) => {
return (
<MuiModal
open={open}
onClose={onClose}
aria-labelledby="modal-modal-title"
aria-describedby="modal-modal-description"
>
<Box sx={style}>
{title && (
<Typography
id="modal-modal-title"
variant="h6"
component="h2"
gutterBottom
>
{title}
</Typography>
)}
<Box id="modal-modal-description">{children}</Box>
</Box>
</MuiModal>
);
};