Simplify spot button & input parameters

This commit is contained in:
2024-01-11 22:16:17 +01:00
parent c2956ac373
commit 683670f77a
4 changed files with 37 additions and 36 deletions

View File

@@ -1,17 +1,19 @@
<script>
export default {
props: {
iconClass: String,
icon: String,
text: String,
margin: Boolean,
otherClasses: String
classes: String
},
data() {
return {
classNames: 'fa fa-'+this.iconClass+(this.margin?' push':'')+(this.otherClasses?' '+this.otherClasses:'')
classNames: 'fa fa-'+this.icon+((this.margin || this.text && this.text!='')?' push':'')+(this.classes?' '+this.classes:'')
}
}
}
</script>
<template>
<i :class="classNames"></i>
<i :class="classNames"></i>{{ text }}
</template>