* HM-28 Добавил компонент таблицы
This commit is contained in:
mrPadre
2020-07-14 12:40:06 +03:00
committed by GitHub
parent b17313dbf6
commit 521a80c1e3
15 changed files with 186 additions and 6 deletions

View File

@ -0,0 +1,28 @@
import Component from '../component/index';
import './ApiInfoComponent.css';
class ApiInfoComponent extends Component {
constructor (container) {
super('#api-info', container);
this.infoTitle = this.mainNode.querySelector('.Info__title');
this.infoSidebar = this.mainNode.querySelector('.Info__sidebar');
this.infoEditor = this.mainNode.querySelector('.Info__editor');
this.infoFooter = this.mainNode.querySelector('.Info__footer');
}
render = (object, index) => {
this.object = object;
this.index = index;
if (this.object) {
this.infoTitle.textContent = this.object.key ;
this.infoSidebar.textContent = this.object.description;
this.infoEditor.textContent = this.object.value;
this.infoFooter.textContent = this.object.author;
}
}
}
export default ApiInfoComponent;