refactor: allow non i118n text to be passed
This commit is contained in:
parent
b8822f286b
commit
adc0934d45
1 changed files with 11 additions and 6 deletions
|
|
@ -1,18 +1,23 @@
|
|||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
titleI18n: string;
|
||||
title?: string;
|
||||
titleI18n?: string;
|
||||
hslaColor?: string;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span
|
||||
class="rounded flex flex-center q-pa-xs"
|
||||
<div
|
||||
class="rounded q-px-sm flex-center"
|
||||
:style="`color: hsla(var(${!!hslaColor ? hslaColor : '--green-6-hsl'}) / 0.8); background: hsla(var(${!!hslaColor ? hslaColor : '--green-6-hsl'}) / 0.1); `"
|
||||
>
|
||||
🞄
|
||||
{{ $t(titleI18n) }}
|
||||
</span>
|
||||
{{ title || (!!titleI18n ? $t(titleI18n) : '-') }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped>
|
||||
div {
|
||||
display: inline-flex;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue