debian-mirror-gitlab/app/assets/javascripts/groups/init_invite_members_banner.js
2021-11-11 11:23:49 +05:30

32 lines
643 B
JavaScript

import Vue from 'vue';
import InviteMembersBanner from '~/groups/components/invite_members_banner.vue';
export default function initInviteMembersBanner() {
const el = document.querySelector('.js-group-invite-members-banner');
if (!el) {
return false;
}
const {
svgPath,
inviteMembersPath,
trackLabel,
calloutsPath,
calloutsFeatureId,
groupId,
} = el.dataset;
return new Vue({
el,
provide: {
svgPath,
inviteMembersPath,
trackLabel,
calloutsPath,
calloutsFeatureId,
groupId,
},
render: (createElement) => createElement(InviteMembersBanner),
});
}