// noinspection JSCheckFunctionSignatures Vue.component('tt-button', { //language=Vue template: `
`, props: { sm: {type: Boolean, default: false}, icon: {type: String, required: false}, text: {type: String, required: false}, href: {type: String, required: false}, additionalClass: {type: String, required: false}, // TODO: maybe instead of browser confirmation add a custom beautiful confirmation dialog confirmText: {type: String, required: false}, }, computed: { buttonClasses() { const classes = { 'btn-sm': this.sm, } if (!this.additionalClass) return classes for (const className of this.additionalClass.split(' ')) { classes[className] = true } return classes } } })