<T> allow adding an icon for each paragraph

This commit is contained in:
Avris 2021-12-01 16:14:48 +01:00
parent 937ece9059
commit ef77b33f52
2 changed files with 8 additions and 4 deletions

View File

@ -2,10 +2,14 @@
<component :is="Array.isArray(txt) ? 'div' : 'span'">
<template v-if="Array.isArray(txt)">
<p v-for="p in txt">
<Icon v-if="icon" :v="icon"/>
<LinkedText :text="p"/>
</p>
</template>
<LinkedText v-else :text="txt"/>
<template v-else>
<Icon v-if="icon" :v="icon"/>
<LinkedText :text="txt"/>
</template>
</component>
</template>
@ -15,7 +19,8 @@
export default {
props: {
params: {},
silent: {type: Boolean}
silent: {type: Boolean},
icon: {},
},
data() {
return {

View File

@ -93,8 +93,7 @@
</div>
</template>
<p class="small">
<Icon v="info-circle"/>
<T>home.generator.alt</T>
<T icon="info-circle">home.generator.alt</T>
</p>
<!-- TODO #136
<p class="small" v-if="config.pronunciation.enabled">