refactor: create BadgeCompoent
This commit is contained in:
parent
de7e6db13d
commit
dfe749d206
1 changed files with 18 additions and 0 deletions
18
src/components/BadgeCompoent.vue
Normal file
18
src/components/BadgeCompoent.vue
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
defineProps<{
|
||||||
|
titleI18n: string;
|
||||||
|
hslaColor?: string;
|
||||||
|
}>();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<span
|
||||||
|
class="rounded flex flex-center q-pa-xs"
|
||||||
|
:style="`color: hsla(var(${!!hslaColor ? hslaColor : '--green-6-hsl'}) / 0.8); background: hsla(var(${!!hslaColor ? hslaColor : '--green-6-hsl'}) / 0.1); `"
|
||||||
|
>
|
||||||
|
🞄
|
||||||
|
{{ $t(titleI18n) }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue