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

View File

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