2017-06-12 05:20:19 -04:00
|
|
|
<script>
|
2020-09-11 14:08:42 -04:00
|
|
|
import { GlIcon, GlLink } from '@gitlab/ui';
|
2018-11-02 13:15:56 -04:00
|
|
|
|
2018-10-10 02:23:54 -04:00
|
|
|
export default {
|
|
|
|
name: 'SidebarDetailRow',
|
2018-11-02 13:15:56 -04:00
|
|
|
components: {
|
2020-09-11 14:08:42 -04:00
|
|
|
GlIcon,
|
2018-11-02 13:15:56 -04:00
|
|
|
GlLink,
|
|
|
|
},
|
2018-10-10 02:23:54 -04:00
|
|
|
props: {
|
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '',
|
2017-06-12 05:20:19 -04:00
|
|
|
},
|
2018-10-10 02:23:54 -04:00
|
|
|
value: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
2017-06-12 05:20:19 -04:00
|
|
|
},
|
2018-10-10 02:23:54 -04:00
|
|
|
helpUrl: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
hasTitle() {
|
|
|
|
return this.title.length > 0;
|
|
|
|
},
|
|
|
|
hasHelpURL() {
|
|
|
|
return this.helpUrl.length > 0;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2017-06-12 05:20:19 -04:00
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<p class="build-detail-row">
|
2018-12-19 14:16:10 -05:00
|
|
|
<span v-if="hasTitle" class="font-weight-bold">{{ title }}:</span> {{ value }}
|
2018-11-16 15:07:38 -05:00
|
|
|
<span v-if="hasHelpURL" class="help-button float-right">
|
|
|
|
<gl-link :href="helpUrl" target="_blank" rel="noopener noreferrer nofollow">
|
2020-09-11 14:08:42 -04:00
|
|
|
<gl-icon name="question-o" />
|
2018-11-02 13:15:56 -04:00
|
|
|
</gl-link>
|
2018-02-20 23:28:31 -05:00
|
|
|
</span>
|
2017-06-12 05:20:19 -04:00
|
|
|
</p>
|
|
|
|
</template>
|