All files / src/components/item LabelTag.vue

100% Statements 1/1
100% Branches 4/4
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18              4x                    
<script setup lang="ts">
import type { Label } from '../../types'
 
defineProps<{ label: Label }>()
</script>
 
<template>
  <span
    class="inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-medium"
    :style="label.color
      ? { backgroundColor: label.color + '33', color: label.color }
      : {}"
    :class="!label.color ? 'bg-ctp-surface1 text-ctp-subtext0' : ''"
  >
    {{ label.name }}
  </span>
</template>