import React, {useState} from "react"; import {useClickAway} from "./useClickAway"; import {ProcessOptions} from "./Options"; export function DialogPopup({options, data, target, id, big, first, last, options_class}) { const [show, setShow] = useState(false); const ref = useClickAway((e) => { if (e.type === "mousedown") // ignore touchstart setShow(false) } ); let div_classes = `overlayVariant border rounded ${big ? "overlay-bigcard" : "overlay-smallcard"} ${(!big && first) ? "overlay-first" : ""} ${(!big && last) ? "overlay-last" : ""} ${options_class || ""}`; const handleClick = (_event) => { setShow(!show); }; return (