import React, { useState } from 'react';
import { ModalWrapper, ModalContent, CloseButton } from './style';

const Modal = ({ isOpen, onClose, children, width, height, display, top, left, marginTop, marginLeft }) => {
  return (
    <ModalWrapper isOpen={isOpen} width={width} height={height} top={top} left={left}>
      <ModalContent  width={width} height={height} marginTop={marginTop} marginLeft={marginLeft}>
        <CloseButton onClick={onClose} display={display}>&times;</CloseButton>
        {children}
      </ModalContent>
    </ModalWrapper>
  );
};

export default Modal;
