lingo3d
Version:
Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor
18 lines • 718 B
JavaScript
import { jsx as _jsx } from "preact/jsx-runtime";
import { createPortal } from "preact/compat";
const Tooltip = ({ position }) => {
if (!position)
return null;
const height = 13;
return createPortal(_jsx("div", { className: "lingo3d-ui", style: {
zIndex: 2,
position: "absolute",
left: position.x,
top: position.y + height > window.innerHeight
? window.innerHeight - height
: position.y,
pointerEvents: "none"
}, children: _jsx("div", { className: "lingo3d-bg", style: { marginLeft: 50 }, children: "hello world" }) }), document.body);
};
export default Tooltip;
//# sourceMappingURL=Tooltip.js.map