showing results for - "select everything but an element in react"
Caterina
07 Oct 2019
1import reactDom from "react-dom";
2import history from "../history";
3
4const Modal = () => {
5  return reactDom.createPortal(
6    <div
7      onClick={() => history.push("/")}
8      className="ui dimmer modals visible active"
9    >
10      <div
11        onClick={(e) => e.stopPropagation()}
12        id="myModal"
13        className="ui standard modal visible active"
14      >
15        <div className="header">Delte Streams</div>
16        <div className="content">
17          Are you sure you want to delete this stream ?
18        </div>
19        <div className="actions">
20          <button className="ui primary button">Delete</button>
21          <button className="ui button">Cancel</button>
22        </div>
23      </div>
24    </div>,
25    document.querySelector("#modal")
26  );
27};
28
29export default Modal;
30