gitlab-org--gitlab-foss/app/assets/javascripts/vue_shared/components/confidentiality_badge.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
748 B
Vue
Raw Normal View History

<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>