mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-02-09 17:54:49 +08:00
![Dan Brown](/assets/img/avatar_default.png)
Fixed broken build system in broken webpack version. Also updates module system to standardise on ES6 import/exports, Especially since babel has changed it's 'default' logic for the old module system.
16 lines
318 B
JavaScript
16 lines
318 B
JavaScript
|
|
class Sidebar {
|
|
|
|
constructor(elem) {
|
|
this.elem = elem;
|
|
this.toggleElem = elem.querySelector('.sidebar-toggle');
|
|
this.toggleElem.addEventListener('click', this.toggle.bind(this));
|
|
}
|
|
|
|
toggle(show = true) {
|
|
this.elem.classList.toggle('open');
|
|
}
|
|
|
|
}
|
|
|
|
export default Sidebar; |