mirror of
https://github.com/sergeyyarkov/digital-store.git
synced 2026-10-11 10:19:15 +03:00
16 lines
264 B
JavaScript
16 lines
264 B
JavaScript
export class Component {
|
|
constructor(id) {
|
|
this.$el = document.getElementById(id);
|
|
this.init();
|
|
}
|
|
|
|
init() {}
|
|
|
|
hide() {
|
|
this.$el.classList.add('hide');
|
|
}
|
|
|
|
show() {
|
|
this.$el.classList.remove('hide')
|
|
}
|
|
} |