<template>
  <u-tag :text="item?.label" :bgColor="item?.color" :color="item?.textColor" />
</template>

<script setup lang="ts">
import { computed } from 'vue'

const props = defineProps<{
  enums: MyEnumItemProps[]
  value: any
}>()

const item = computed(() => {
  return props.enums.find((data: MyEnumItemProps) => {
    return data.value === String(props.value)
  })
})
</script>
