HM-27 Добавил компонет меню вместе с компонентом кнопки (#11)

* HM-27 Добавил компонет меню вместе с компонентом кнопки
This commit is contained in:
mrPadre
2020-07-15 12:30:09 +03:00
committed by GitHub
parent 1cfcd762be
commit 40a2342758
12 changed files with 120 additions and 8 deletions

View File

@ -0,0 +1,15 @@
import Component from '../component/index';
class ButtonComponent extends Component {
constructor (parentNode, text, newStyle) {
super('#button', parentNode);
this.mainNode.textContent = text;
this.mainNode.className = newStyle;
this.addEventListener(this.mainNode, 'click', (event) => {
this.next('click', event);
});
}
}
export default ButtonComponent;

View File