import { Box, Button, Modal } from "@mui/material"; import { Fragment, ReactElement, memo } from "react"; import { makeStylesEdt } from "../../theme"; import { createCustomizableLunaticField } from "../../utils/create-customizable-lunatic-field"; type ModalProps = { isModalDisplayed: boolean; onCompleteCallBack(): void; labels: { title: string; content: string; endContent: string; buttonLabel: string; }; icon: ReactElement; arrowForwardIcon: ReactElement; }; const ModalEdt = memo((props: ModalProps) => { const { isModalDisplayed, onCompleteCallBack, labels, icon, arrowForwardIcon } = props; const { classes, cx } = useStyles(); return ( <> {icon}

{labels?.title}

{labels?.content}

{labels?.endContent}

); }); const useStyles = makeStylesEdt({ "name": { Modal } })(theme => ({ errorBox: { position: "absolute", transform: "translate(-50%, -50%)", top: "50%", left: "50%", backgroundColor: theme.variables.modal, border: "2px solid transparent", borderColor: theme.variables.modal, boxShadow: "24", index: "2", padding: "1rem", borderRadius: "10px", minWidth: "300px", "&:focus": { outline: "none", }, }, boxCenter: { display: "flex", justifyContent: "center", }, titleBox: { color: theme.palette.secondary.main, }, endContentBox: { fontWeight: "bold", color: theme.palette.primary.main, margin: "0.5rem", }, contentBox: { margin: "0.5rem", color: theme.palette.secondary.main, }, boxEvenly: { display: "flex", justifyContent: "space-evenly", marginTop: "2rem", marginBottom: "1rem", }, buttonNext: { width: "100%", fontSize: "16px", }, arrowIcon: { svg: { color: theme.variables.white, }, }, })); export default createCustomizableLunaticField(ModalEdt, "ModalEdt");