debian-mirror-gitlab/app/assets/javascripts/jobs/components/sidebar_detail_row.vue

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

46 lines
838 B
Vue
Raw Normal View History

2017-09-10 17:25:29 +05:30
<script>
2020-11-24 15:15:51 +05:30
import { GlIcon, GlLink } from '@gitlab/ui';
2018-12-13 13:39:08 +05:30
export default {
name: 'SidebarDetailRow',
components: {
2020-11-24 15:15:51 +05:30
GlIcon,
2018-12-13 13:39:08 +05:30
GlLink,
},
props: {
title: {
type: String,
required: false,
default: '',
},
value: {
type: String,
required: true,
},
helpUrl: {
type: String,
required: false,
default: '',
},
},
computed: {
hasTitle() {
return this.title.length > 0;
2017-09-10 17:25:29 +05:30
},
2018-12-13 13:39:08 +05:30
hasHelpURL() {
return this.helpUrl.length > 0;
2017-09-10 17:25:29 +05:30
},
2018-12-13 13:39:08 +05:30
},
};
2017-09-10 17:25:29 +05:30
</script>
<template>
2021-03-11 19:13:27 +05:30
<p class="gl-display-flex gl-justify-content-space-between gl-mb-2">
<span v-if="hasTitle"
><b>{{ title }}:</b> {{ value }}</span
>
<gl-link v-if="hasHelpURL" :href="helpUrl" target="_blank">
<gl-icon name="question-o" />
</gl-link>
2017-09-10 17:25:29 +05:30
</p>
</template>