#se-menu menu work starting code added

This commit is contained in:
Agriya Dev5
2020-12-03 19:34:51 +05:30
parent 7950f7ce4a
commit 3d037f110a
4 changed files with 90 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
/* eslint-disable node/no-unpublished-import */
import 'elix/define/Menu.js';
import 'elix/define/MenuItem.js';
const template = document.createElement('template');
template.innerHTML = `
<style>
</style>
<elix-menu-item>New</elix-menu-item>
`;
/**
* @class SeMenuItem
*/
export class SeMenuItem extends HTMLElement {
/**
* @function constructor
*/
constructor () {
super();
// create the shadowDom and insert the template
this._shadowRoot = this.attachShadow({mode: 'open'});
this._shadowRoot.appendChild(template.content.cloneNode(true));
// this.$menu = this._shadowRoot.querySelector('elix-menu');
}
}
// Register
customElements.define('se-menu-item', SeMenuItem);