sidebar skeleton

This commit is contained in:
zadam
2019-07-21 10:17:08 +02:00
parent d54f848572
commit 5283b489dc
8 changed files with 152 additions and 31 deletions

View File

@@ -0,0 +1,25 @@
class Sidebar {
/**
* @param {TabContext} ctx
*/
constructor(ctx) {
this.ctx = ctx;
this.$sidebar = ctx.$tabContent.find(".note-detail-sidebar");
this.$showSideBarButton = this.ctx.$tabContent.find(".show-sidebar-button");
this.$showSideBarButton.hide();
this.$hideSidebarButton = this.$sidebar.find(".hide-sidebar-button");
this.$hideSidebarButton.click(() => {
this.$sidebar.hide();
this.$showSideBarButton.show();
});
this.$showSideBarButton.click(() => {
this.$sidebar.show();
this.$showSideBarButton.hide();
})
}
}
export default Sidebar;