import styles from "./styles.module.scss";

interface IModalProps {
  children: React.ReactNode;
  handleClose: () => void;
}

function BottomModal({ children, handleClose }: IModalProps) {
  return (
    <div className={styles.overlay}>
      <div className={styles.wrapper}>
        <div className={styles.content}>
          <button type="button" className={styles.close} onClick={handleClose}>
            <svg
              xmlns="http://www.w3.org/2000/svg"
              width="24"
              height="24"
              viewBox="0 0 24 24"
            >
              <title>cross</title>
              <path d="M10.674 12l-6.837 6.837 1.326 1.326 6.837-6.837 6.837 6.837 1.326-1.326-6.837-6.837 6.837-6.837-1.326-1.326-6.837 6.837-6.837-6.837-1.326 1.326 6.837 6.837z"></path>
            </svg>
          </button>
          <div className={styles.body}>{children}</div>
        </div>
      </div>
    </div>
  );
}

export default BottomModal;
