Commit 869b425b authored by Yogi's avatar Yogi Committed by Olena Horal-Koretska

Move badge to vue component in project badges

parent 9d9b902a
<script> <script>
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlBadge } from '@gitlab/ui';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import { GROUP_BADGE } from '../constants'; import { GROUP_BADGE } from '../constants';
import BadgeListRow from './badge_list_row.vue'; import BadgeListRow from './badge_list_row.vue';
...@@ -9,6 +9,7 @@ export default { ...@@ -9,6 +9,7 @@ export default {
components: { components: {
BadgeListRow, BadgeListRow,
GlLoadingIcon, GlLoadingIcon,
GlBadge,
}, },
computed: { computed: {
...mapState(['badges', 'isLoading', 'kind']), ...mapState(['badges', 'isLoading', 'kind']),
...@@ -26,7 +27,7 @@ export default { ...@@ -26,7 +27,7 @@ export default {
<div class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
{{ s__('Badges|Your badges') }} {{ s__('Badges|Your badges') }}
<span v-show="!isLoading" class="badge badge-pill">{{ badges.length }}</span> <gl-badge v-show="!isLoading" size="sm">{{ badges.length }}</gl-badge>
</div> </div>
<gl-loading-icon v-show="isLoading" size="lg" class="card-body" /> <gl-loading-icon v-show="isLoading" size="lg" class="card-body" />
<div v-if="hasNoBadges" class="card-body"> <div v-if="hasNoBadges" class="card-body">
......
---
title: Move badge to vue component in project badges
merge_request: 58045
author: Yogi (@yo)
type: changed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment