1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<script>
import { GlLink, GlIcon } from '@gitlab/ui';
import { sprintf } from '~/locale';
import { HELP_LINK_ARIA_LABEL } from '~/usage_quotas/storage/constants';
export default {
name: 'StorageTypeHelpLink',
components: {
GlLink,
GlIcon,
},
props: {
storageType: {
type: String,
required: true,
},
helpLinks: {
type: Object,
required: true,
},
},
computed: {
ariaLabel() {
return sprintf(HELP_LINK_ARIA_LABEL, {
linkTitle: this.storageType,
});
},
},
};
</script>
<template>
<gl-link :href="helpLinks[storageType]" target="_blank" :aria-label="ariaLabel">
<gl-icon name="question-o" :size="12" />
</gl-link>
</template>
|