Line data Source code
1 : // @ts-check 2 : import Vue from "vue"; 3 : 4 : export default /** @type {V.Constructor<any, any>} */ (Vue).extend({ 5 : name: "BadgeButton", 6 : props: { 7 : type: { type: String, default: "" }, 8 : badges: { type: Object, default: null }, 9 : isSelected: { type: Boolean, default: false } 10 : }, 11 : computed: { 12 : buttonClass() { 13 43 : return { 14 : "btn-outline-dark": !this.isSelected, 15 : "btn-primary": this.isSelected 16 : }; 17 : }, 18 : badgeClass() { 19 43 : return { 20 : "text-primary": this.isSelected, 21 : "border-primary": this.isSelected 22 : }; 23 : } 24 : } 25 : });