import React from 'react'; import PropTypes from 'prop-types'; import ls from './Menu.less'; import AuxWidget from "./AuxWidget"; import cx from 'classnames'; export default function Menu({children, x, y, orientationUp, ...props}) { return {children} ; } export function MenuSeparator() { return
} export function MenuItem({icon, label, hotKey, style, disabled, onClick}, {closeAllUpPopups}) { if (hotKey) { hotKey = hotKey.replace(/\s/g, ''); if (hotKey.length > 15) { hotKey = null; } } let clickHandler = disabled ? undefined : () => { closeAllUpPopups(); onClick(); }; return
e.stopPropagation()} style={style} onClick={clickHandler}> {icon} {label} {hotKey && {hotKey}}
; } MenuItem.contextTypes = { closeAllUpPopups: PropTypes.func };