gitlab-org--gitlab-foss/app/assets/javascripts/groups/init_invite_members_banner.js

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),
});
}