debian-mirror-gitlab/app/assets/javascripts/projects/project_remove_modal.js
2020-08-09 17:44:08 +05:30

24 lines
544 B
JavaScript

import Vue from 'vue';
import RemoveProjectModal from './components/remove_modal.vue';
export default (selector = '#js-confirm-project-remove') => {
const el = document.querySelector(selector);
if (!el) return;
const { formPath, confirmPhrase, warningMessage } = el.dataset;
// eslint-disable-next-line no-new
new Vue({
el,
render(createElement) {
return createElement(RemoveProjectModal, {
props: {
confirmPhrase,
warningMessage,
formPath,
},
});
},
});
};