import React from "react";
export const ErrorMessage = ({ showError, setShowError, message }) => {
  let className = "modal-wrapper error-box ";
  if (showError === true) {
    className += "show-modal-wrapper";
  }

  return (
    <div className={className}>
      <div className="modal-block">
        <div className="confirmation-content-wrapper">
          <div className="error-message notes-error-message">{message}</div>
        </div>
        <div className="btn-container">
          <input
            type="button"
            value="OK"
            className="btn-toast"
            onClick={() => {
              setShowError(false);
            }}
          />
        </div>
      </div>
    </div>
  );
};
