UNPKG

lingo3d

Version:

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

21 lines 1.19 kB
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime"; const Drawer = ({ show, onHide, children, style, className, width = 200, anchor = "left", onDragOverMask }) => { return (_jsxs("div", { className: "lingo3d-absfull", style: { pointerEvents: "none" }, children: [_jsx("div", { className: "lingo3d-absfull", style: { background: "black", opacity: show ? 0.5 : 0, transition: "opacity 500ms", pointerEvents: show ? "auto" : "none" }, onClick: onHide, onDragEnter: onDragOverMask }), _jsx("div", { className: className, style: { width, height: "100%", position: "absolute", left: anchor === "left" ? 0 : undefined, right: anchor === "right" ? 0 : undefined, transition: "transform 500ms", transform: `translateX(${show ? 0 : anchor === "left" ? -100 : 100}%)`, pointerEvents: "auto", ...style }, children: children })] })); }; export default Drawer; //# sourceMappingURL=Drawer.js.map