2020-10-16 15:08:46 +00:00
|
|
|
<script>
|
|
|
|
import { GlButton, GlTooltipDirective } from '@gitlab/ui';
|
2021-02-14 18:09:20 +00:00
|
|
|
import { mapActions } from 'vuex';
|
2020-10-16 15:08:46 +00:00
|
|
|
import { s__ } from '~/locale';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'RemoveGroupLinkButton',
|
|
|
|
i18n: {
|
|
|
|
buttonTitle: s__('Members|Remove group'),
|
|
|
|
},
|
|
|
|
components: { GlButton },
|
|
|
|
directives: {
|
|
|
|
GlTooltip: GlTooltipDirective,
|
|
|
|
},
|
2021-04-13 21:11:25 +00:00
|
|
|
inject: ['namespace'],
|
2020-10-16 15:08:46 +00:00
|
|
|
props: {
|
|
|
|
groupLink: {
|
|
|
|
type: Object,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
2021-04-13 21:11:25 +00:00
|
|
|
...mapActions({
|
|
|
|
showRemoveGroupLinkModal(dispatch, payload) {
|
|
|
|
return dispatch(`${this.namespace}/showRemoveGroupLinkModal`, payload);
|
|
|
|
},
|
|
|
|
}),
|
2020-10-16 15:08:46 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<gl-button
|
|
|
|
v-gl-tooltip.hover
|
|
|
|
variant="danger"
|
|
|
|
:title="$options.i18n.buttonTitle"
|
|
|
|
:aria-label="$options.i18n.buttonTitle"
|
|
|
|
icon="remove"
|
2021-02-04 09:09:30 +00:00
|
|
|
data-qa-selector="delete_group_access_link"
|
2020-10-16 15:08:46 +00:00
|
|
|
@click="showRemoveGroupLinkModal(groupLink)"
|
|
|
|
/>
|
|
|
|
</template>
|