import { experimentOn } from '@islavi/ng2-component-lab'; export default experimentOn('Menu') .group("Popups",[ { id: 'basicPopupMenuStatic', showSource: true, title: 'Basic popup menu (static)', description: 'Basic popup menu (static)', template: ` First Selected Disabled Second ` }, { id: 'basicMenuRelative', title: 'Basic menu (relative)', description: 'Basic menu (relative)', showSource: true, context: { showSelectedItem: (msg, color) => { const elm = document.getElementById('selectedItem'); elm.style.color = color; elm.innerHTML = msg; } }, styles: [` .message { position: absolute; top: 0; left: 0; color: white; } .click-area { position: absolute; width: 100%; height: 100%; } `], template: `
Click in the box...
(popup menu is {{menuStatus === undefined ? 'never opened' : (menuStatus ? 'open at '+menuPos.x+' , '+menuPos.y : 'closed')}})
selected:
First Disabled Second Third (none)
` } ]);