Sha256: 9c2962b228ee194215275ce40c945a3530bacba660748ca6150e2cf325be66a2

Contents?: true

Size: 420 Bytes

Versions: 68

Compression:

Stored size: 420 Bytes

Contents

export default function tabPanelsComponent(store) {
  return {
    get store() {
      return store || this;
    },

    get id() {
      return this.$root.id;
    },

    get panels() {
      return Array.from(this.$refs.panels.children);
    },

    isActive(el) {
      return this.store.activeTab === this._getRef(el);
    },

    // protected

    _getRef(el) {
      return el.getAttribute("x-ref");
    },
  };
}

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
lookbook-1.0.0.beta.8 app/components/lookbook/tab_panels/component.js
lookbook-1.0.0.beta.7 app/components/lookbook/tab_panels/component.js
lookbook-1.0.0.beta.6 app/components/lookbook/tab_panels/component.js
lookbook-1.0.0.beta.5 app/components/lookbook/tab_panels/component.js
lookbook-1.0.0.beta.4 app/components/lookbook/tab_panels/component.js
lookbook-1.0.0.beta.3 app/components/lookbook/tab_panels/component.js
lookbook-1.0.0.beta.2 app/components/lookbook/tab_panels/component.js
lookbook-1.0.0.beta.1 app/components/lookbook/tab_panels/component.js