UNPKG

lingo3d

Version:

Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor

15 lines 943 B
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime"; import { createPortal } from "preact/compat"; import { stopPropagation } from "../utils/stopPropagation"; import prevent from "../utils/prevent"; const Dialog = ({ signal, children }) => { if (!signal?.value) return null; return createPortal(_jsxs("div", { ref: stopPropagation, className: "lingo3d-ui lingo3d-absfull lingo3d-flexcenter", style: { zIndex: 2 }, onContextMenu: prevent, children: [_jsx("div", { className: "lingo3d-absfull", style: { background: "rgba(0, 0, 0, 0.5)" }, onMouseDown: () => (signal.value = undefined) }), _jsx("div", { className: "lingo3d-bg-dark lingo3d-flexcol", style: { border: "1px solid rgba(255, 255, 255, 0.2)", minWidth: 300, minHeight: 100 }, children: children })] }), document.body); }; export default Dialog; //# sourceMappingURL=Dialog.js.map