debian-mirror-gitlab/app/assets/javascripts/environments/components/environment_external_url.vue
2020-10-24 23:57:45 +05:30

39 lines
700 B
Vue

<script>
import { GlTooltipDirective, GlButton } from '@gitlab/ui';
import { s__ } from '~/locale';
/**
* Renders the external url link in environments table.
*/
export default {
components: {
GlButton,
},
directives: {
GlTooltip: GlTooltipDirective,
},
props: {
externalUrl: {
type: String,
required: true,
},
},
computed: {
title() {
return s__('Environments|Open live environment');
},
},
};
</script>
<template>
<gl-button
v-gl-tooltip
:title="title"
:aria-label="title"
:href="externalUrl"
class="external-url"
target="_blank"
icon="external-link"
rel="noopener noreferrer nofollow"
/>
</template>