jws-frontend/src/components/BadgeComponent.vue

24 lines
489 B
Vue
Raw Normal View History

2024-10-25 17:27:32 +07:00
<script setup lang="ts">
defineProps<{
title?: string;
titleI18n?: string;
2024-10-25 17:27:32 +07:00
hslaColor?: string;
}>();
</script>
<template>
<div
class="rounded q-px-sm flex-center"
2024-10-25 17:27:32 +07:00
:style="`color: hsla(var(${!!hslaColor ? hslaColor : '--green-6-hsl'}) / 0.8); background: hsla(var(${!!hslaColor ? hslaColor : '--green-6-hsl'}) / 0.1); `"
>
&#128900;
{{ title || (!!titleI18n ? $t(titleI18n) : '-') }}
</div>
2024-10-25 17:27:32 +07:00
</template>
<style scoped>
div {
display: inline-flex;
}
</style>