24 lines
503 B
Vue
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> |