Welcome to mirror list, hosted at ThFree Co, Russian Federation.

modal_stub.js « stubs « modals « components « users « admin « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4dc55e909a0c1c23158cd2ab68d2e7b867895165 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const ModalStub = {
  inheritAttrs: false,
  name: 'glmodal-stub',
  data() {
    return {
      showWasCalled: false,
    };
  },
  methods: {
    show() {
      this.showWasCalled = true;
    },
    hide() {},
  },
  render(h) {
    const children = [this.$slots.default, this.$slots['modal-footer']]
      .filter(Boolean)
      .reduce((acc, nodes) => acc.concat(nodes), []);
    return h('div', children);
  },
};

export default ModalStub;