UNPKG

@iktos-oss/molecule-representation

Version:

exports interactif molecule represnetations as react components

29 lines 965 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const react_1 = __importDefault(require("react")); const Popup = ({ visible, position, content, onClose }) => { if (!visible) return null; const style = { display: 'flex', flexDirection: 'column', justifyContent: 'space-between', height: 100, position: 'absolute', top: position.y, left: position.x, zIndex: 100, backgroundColor: 'white', border: '1px solid black', padding: '8px', borderRadius: '5px', }; return (react_1.default.createElement("div", { style: style }, content, react_1.default.createElement("button", { onClick: onClose }, "Close"))); }; exports.default = Popup; //# sourceMappingURL=Popup.js.map