UNPKG

@up-group-ui/react-controls

Version:
59 lines 2.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MenuStyle = void 0; var typestyle_1 = require("typestyle"); var utils_1 = require("../../../Common/theming/utils"); var MenuStyle = function (theme, _a) { var top = _a.top, left = _a.left, isVisible = _a.isVisible; return (0, typestyle_1.style)({ position: 'fixed', top: top, left: left, padding: (0, utils_1.toRem)(5) + " 0", margin: (0, utils_1.toRem)(2) + " 0 0", fontSize: (0, utils_1.toRem)(16), color: theme.colorMap.primaryFg, textAlign: 'left', backgroundColor: '#fff', backgroundClip: 'padding-box', border: '1px solid rgba(0,0,0,.15)', borderRadius: (0, utils_1.toRem)(4), outline: 'none', opacity: isVisible ? 1 : 0, zIndex: isVisible ? 9999 : -1, pointeEvents: isVisible ? 'auto' : 'none', $nest: { '& .up-contextmenu-link': { display: 'inline-block', width: '100%', padding: (0, utils_1.toRem)(3) + " " + (0, utils_1.toRem)(20), clear: 'both', fontWeight: 400, lineHeight: 1.5, color: theme.colorMap.primary, textAlign: 'inherit', whiteSpace: 'nowrap', background: 'transparent', border: 0, textDecoration: 'none', }, '& .up-contextmenu-link.active,& .up-contextmenu-link:hover': { color: theme.colorMap.primaryFg, backgroundColor: theme.colorMap.primary, borderColor: theme.colorMap.primaryDark, textDecoration: 'none', }, '& .up-contextmenu-item.submenu > a': { paddingRight: (0, utils_1.toRem)(27), }, '& .up-contextmenu-item.submenu > a:after': { content: '▶', display: 'inline-block', position: 'absolute', right: (0, utils_1.toRem)(7), }, }, }); }; exports.MenuStyle = MenuStyle; //# sourceMappingURL=styles.js.map