Skip to content

Commit

Permalink
fixed similar badges (#1972)
Browse files Browse the repository at this point in the history
Co-authored-by: Taron Chatoyan <[email protected]>
  • Loading branch information
t-chatoyan and Taron Chatoyan authored Nov 21, 2024
1 parent 988ce25 commit 852613f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions components/content/Badge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
<div class="fw-bold d-flex gap-2 flex-wrap mb-3">
<p class="mb-0">Available on:</p>
<span class="badge d-flex align-items-center bg-body-tertiary">{{version}}</span>
<span v-bind:v-if="edition" v-for="edition in editions" class="badge d-flex align-items-center" :class="`bg-${editionInfo(edition).color}`">{{ editionInfo(edition).label }}</span>
<span
v-for="edition in editions.split(',').filter(edition => edition.trim())"
:key="edition"
class="badge d-flex align-items-center"
:class="`bg-${editionInfo(edition).color}`"
>
{{ editionInfo(edition).label }}
</span>
</div>

</template>
Expand All @@ -16,8 +23,8 @@
default: ''
},
editions: {
type: Object,
default: []
type: String,
default: ''
}
},
data() {
Expand All @@ -31,10 +38,6 @@
}
}
},
mounted() {
console.log('All props:', this.$props);
console.log('All props:', this.$props.text);
},
methods: {
editionInfo(edition) {
return this.editionLabelAndColorByPrefix?.[edition] ?? {
Expand Down

0 comments on commit 852613f

Please sign in to comment.