Sha256: 543b753c32e429ae0c346e26288d23b7f6afb7d1c6b87ac29b653b7187b032e5

Contents?: true

Size: 557 Bytes

Versions: 33

Compression:

Stored size: 557 Bytes

Contents

import { CocoComponent } from "@js/coco";
import { getData } from "@helpers/alpine";

export default CocoComponent("appLayoutPickerButton", ({ selected }) => {
  return {
    selectedLayout: selected,

    getPicker() {
      return getData(
        this.$root.querySelector("[data-role='layout-picker']")
          .firstElementChild
      );
    },

    getButton() {
      return getData(this.$root.querySelector(".layout-picker-trigger"));
    },

    init() {
      this.$watch("selectedLayout", () => this.getButton().hideDropdown());
    },
  };
});

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
coveragebook_components-0.10.0 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.9.1 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.9.0 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.8.9 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.8.8 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.8.7 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.8.6 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.8.5 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.8.4 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.8.3 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.8.2 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.8.1 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.8.0 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.8.0.beta.3 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.8.0.beta.2 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.8.0.beta.1 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.7.10 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.7.9 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.7.8 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js
coveragebook_components-0.7.7 app/components/coco/app/elements/layout_picker_button/layout_picker_button.js