Skip to content

Commit

Permalink
Merge pull request #958 from oslokommune/custom-item-color
Browse files Browse the repository at this point in the history
Allow customizing item colors
  • Loading branch information
petterhj authored Feb 6, 2024
2 parents 5b62f2e + 8126ca0 commit 8b52d4b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/components/ItemTag.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<template>
<span class="item-tag">
<span
class="item-tag__bullet"
:style="{ background: contributorTagColor(item.name) }"
></span>
<span class="item-tag__bullet" :style="bulletStyle"></span>
<span>{{ item.name }}</span>
</span>
</template>
Expand All @@ -21,6 +18,14 @@ export default {
},
},
computed: {
bulletStyle() {
return {
background: this.item?.color || contributorTagColor(this.item.name),
};
},
},
methods: {
contributorTagColor,
},
Expand Down

0 comments on commit 8b52d4b

Please sign in to comment.