debian-mirror-gitlab/app/assets/javascripts/vue_shared/components/confidentiality_badge.vue
2022-07-16 19:58:13 +02:00

39 lines
748 B
Vue

<script>
import { GlBadge, GlTooltipDirective } from '@gitlab/ui';
import { confidentialityInfoText } from '../constants';
export default {
components: {
GlBadge,
},
directives: {
GlTooltip: GlTooltipDirective,
},
props: {
workspaceType: {
type: String,
required: true,
},
issuableType: {
type: String,
required: true,
},
},
computed: {
confidentialTooltip() {
return confidentialityInfoText(this.workspaceType, this.issuableType);
},
},
};
</script>
<template>
<gl-badge
v-gl-tooltip.bottom
:title="confidentialTooltip"
icon="eye-slash"
variant="warning"
class="gl-display-inline gl-mr-2"
>{{ __('Confidential') }}</gl-badge
>
</template>