diff --git a/components/header.js b/components/header.js index 0fc3a40..f6bbc62 100644 --- a/components/header.js +++ b/components/header.js @@ -1,20 +1,29 @@ export class Header extends HTMLElement { + icons = { + menu: ` + + `, + dot: ` + +`, + } + constructor() { super() this.attachShadow({mode: 'open'}) - this.addButton('=', () => { + this.addButton(this.icons.menu, () => { this.menu.pages = this.getPages() this.menuPanel.classList.add('open') this.overlay.classList.add('open') }) this.addDivider() - this.addButton('-') + this.addButton(this.icons.dot) this.addMenu() } - addButton(text, onClick) { + addButton(html, onClick) { const b = document.createElement('button') - b.innerText = text + b.innerHTML = html this.shadowRoot.appendChild(b) if (onClick) { b.addEventListener('click', onClick) @@ -68,7 +77,7 @@ export class Header extends HTMLElement { background: inherit; color: inherit; font-size: 24px; - width: 24px; + width: 30px; } div.divider { flex-grow: 1;