Files
livetrail/src/components/spotIcon.vue
T
2026-04-20 00:42:45 +02:00

24 lines
503 B
Vue

<script>
export default {
props: {
icon: String,
title: String,
text: String,
margin: Boolean,
classes: String,
textClasses: String
},
computed: {
classNames() {
return 'fa fa-'+this.icon+((this.margin || this.hasText)?' push':'')+(this.classes?' '+this.classes:'')
},
hasText() {
return this.text && this.text != '';
}
}
}
</script>
<template>
<span :title="title"><i :class="classNames"></i><span v-if="hasText" :class="textClasses">{{ text }}</span></span>
</template>