- this.elem = elem;
- this.buttons = elem.querySelectorAll('[toolbox-tab-button]');
- this.contentElements = elem.querySelectorAll('[toolbox-tab-content]');
- this.toggleButton = elem.querySelector('[toolbox-toggle]');
+ this.container = this.$el;
+ this.buttons = this.$manyRefs.tabButton;
+ this.contentElements = this.$manyRefs.tabContent;
+ this.toggleButton = this.$refs.toggle;
+ this.editorWrapEl = this.container.closest('.page-editor');
+
+ this.setupListeners();
+
+ // Set the first tab as active on load
+ this.setActiveTab(this.contentElements[0].dataset.tabContent);
+ }