import React from "react";

const Overlay = (props) => {
  const { item, onClear, overlay } = props;

  return (
    <div
      className="panel panel-default top clearfix"
      style={{ marginBottom: 0 }}
    >
      <div className="pull-right">
        <i
          style={{ cursor: "pointer" }}
          title="Clear"
          className="mdi mdi-close"
          onClick={(e) => onClear(e, overlay)}
        />
      </div>
      <div className="arrow"></div>
      <div className="panel-body">
        <div
          style={{ minWidth: "125px", maxWidth: "300px", textAlign: "center" }}
        >
          {item.displayName}
        </div>
      </div>
    </div>
  );
};
export default Overlay;
