This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/components/tasks/partials/labels.vue

35 lines
566 B
Vue
Raw Normal View History

<template>
<div class="label-wrapper">
<span
:key="label.id"
:style="{'background': label.hexColor, 'color': label.textColor}"
class="tag"
v-for="label in labels">
<span>{{ label.title }}</span>
</span>
</div>
</template>
2022-02-15 12:07:59 +00:00
<script setup lang="ts">
2022-06-23 01:08:35 +00:00
import type { PropType } from 'vue'
2022-07-20 22:42:36 +00:00
import type { ILabel } from '@/models/label'
2022-06-23 01:08:35 +00:00
2022-02-15 12:07:59 +00:00
defineProps({
labels: {
2022-07-20 22:42:36 +00:00
type: Array as PropType<ILabel[]>,
2022-02-15 12:07:59 +00:00
required: true,
},
2022-02-15 12:07:59 +00:00
})
</script>
2021-10-20 12:33:52 +00:00
<style lang="scss" scoped>
.label-wrapper {
display: inline;
}
2021-10-20 12:33:52 +00:00
.tag {
& + & {
margin-left: 0.5rem;
}
}
</style>