import * as React from "react"; import { Box, Modal, Fade, Backdrop, Button, TextField } from "@mui/material"; import theme from "../../../../../theme"; export interface MWProps { open: boolean newPackage: (name: string) => void close: () => void } const ModalPackage = ({open, newPackage, close}: MWProps ) => { const fieldName = React.useRef(null); const checkName = () => { if( fieldName.current != null ) { newPackage( fieldName.current.value ); } } return ( close() } closeAfterTransition BackdropComponent={Backdrop} BackdropProps={{ timeout: 500, }} > ); } export default ModalPackage;