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-2.3.4 app/components/lookbook/tab_panels/component.js
lookbook-2.3.3 app/components/lookbook/tab_panels/component.js
lookbook-2.3.2 app/components/lookbook/tab_panels/component.js
lookbook-2.3.0 app/components/lookbook/tab_panels/component.js
lookbook-2.2.2 app/components/lookbook/tab_panels/component.js
lookbook-2.2.1 app/components/lookbook/tab_panels/component.js
lookbook-2.2.0 app/components/lookbook/tab_panels/component.js
lookbook-2.1.1 app/components/lookbook/tab_panels/component.js
lookbook-2.1.0 app/components/lookbook/tab_panels/component.js
lookbook-2.0.5 app/components/lookbook/tab_panels/component.js
lookbook-2.0.4 app/components/lookbook/tab_panels/component.js
lookbook-2.0.3 app/components/lookbook/tab_panels/component.js
lookbook-2.0.2 app/components/lookbook/tab_panels/component.js
lookbook-2.0.1 app/components/lookbook/tab_panels/component.js
lookbook-2.0.0 app/components/lookbook/tab_panels/component.js
lookbook-2.0.0.rc.3 app/components/lookbook/tab_panels/component.js
lookbook-1.5.5 app/components/lookbook/tab_panels/component.js
lookbook-1.5.4 app/components/lookbook/tab_panels/component.js
lookbook-2.0.0.rc.2 app/components/lookbook/tab_panels/component.js
lookbook-2.0.0.rc.1 app/components/lookbook/tab_panels/component.js