lingo3d
Version:
Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor
22 lines • 1.24 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
import { APPBAR_HEIGHT } from "../../globals";
import { stopPropagation } from "../utils/stopPropagation";
const IconButton = ({ children, onClick, disabled, label, borderless, fill }) => {
return (_jsxs("div", { ref: stopPropagation, onClick: onClick, className: "lingo3d-flexcenter", style: {
pointerEvents: disabled ? "none" : undefined,
minWidth: APPBAR_HEIGHT,
height: APPBAR_HEIGHT - 4,
opacity: disabled ? 0.1 : 1,
cursor: disabled ? undefined : "pointer",
background: fill
? typeof fill === "string"
? fill
: "rgba(255, 255, 255, 0.1)"
: undefined,
border: !borderless
? "1px solid rgba(255, 255, 255, 0.25)"
: undefined
}, children: [label && children && _jsx("div", { style: { width: 10 } }), children && (_jsx("div", { className: "lingo3d-flexcenter", style: { opacity: 0.75 }, children: children })), label && (_jsx("div", { style: { paddingLeft: 10, paddingRight: 10 }, children: label }))] }));
};
export default IconButton;
//# sourceMappingURL=IconButton.js.map