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">
|
<script setup lang="ts">
|
||||||
defineProps<{
|
defineProps<{
|
||||||
titleI18n: string;
|
title?: string;
|
||||||
|
titleI18n?: string;
|
||||||
hslaColor?: string;
|
hslaColor?: string;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<span
|
<div
|
||||||
class="rounded flex flex-center q-pa-xs"
|
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); `"
|
:style="`color: hsla(var(${!!hslaColor ? hslaColor : '--green-6-hsl'}) / 0.8); background: hsla(var(${!!hslaColor ? hslaColor : '--green-6-hsl'}) / 0.1); `"
|
||||||
>
|
>
|
||||||
🞄
|
🞄
|
||||||
{{ $t(titleI18n) }}
|
{{ title || (!!titleI18n ? $t(titleI18n) : '-') }}
|
||||||
</span>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped>
|
||||||
|
div {
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue