diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-16 00:09:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-16 00:09:57 +0300 |
commit | dc497ce27ff62b342b0b3f0871c39c964a266679 (patch) | |
tree | 4372f1e7a19ca3b1f2a8d0bda0eada6258075c6d /app/assets | |
parent | 0905e6bd5042fa84fe66736eb9ab1be94c3d8aa9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/ci_badge_link.vue | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_shared/components/ci_badge_link.vue b/app/assets/javascripts/vue_shared/components/ci_badge_link.vue index 9023807eba3..9aa7a7d6c49 100644 --- a/app/assets/javascripts/vue_shared/components/ci_badge_link.vue +++ b/app/assets/javascripts/vue_shared/components/ci_badge_link.vue @@ -24,6 +24,12 @@ import CiIcon from './ci_icon.vue'; * - On-demand scans list */ +const badgeSizeOptions = { + sm: 'sm', + md: 'md', + lg: 'lg', +}; + export default { components: { CiIcon, @@ -45,10 +51,16 @@ export default { badgeSize: { type: String, required: false, - default: 'md', + default: badgeSizeOptions.md, + validator(value) { + return badgeSizeOptions[value] !== undefined; + }, }, }, computed: { + isSmallBadgeSize() { + return this.badgeSize === badgeSizeOptions.sm; + }, title() { return !this.showText ? this.status?.text : ''; }, @@ -108,6 +120,7 @@ export default { <template> <gl-badge v-gl-tooltip + :class="{ 'gl-pl-0!': isSmallBadgeSize }" :title="title" :href="detailsPath" :size="badgeSize" |