summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/confirm_modal.js
blob: bf2ea3ce38a6e38497e432d556b098c3eeec9065 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import Vue from 'vue';
import ConfirmModal from '~/vue_shared/components/confirm_modal.vue';

const mountConfirmModal = optionalProps =>
  new Vue({
    render(h) {
      return h(ConfirmModal, {
        props: {
          selector: '.js-confirm-modal-button',
          ...optionalProps,
        },
      });
    },
  }).$mount();

export default (optionalProps = {}) => mountConfirmModal(optionalProps);