Vue.component('sidebar-button', { props: { app: String, icon: String, active_app: String }, data: function() { return { hover: false } }, methods: { selector_css() { let result = "sidebar-selector"; if (this.app == this.active_app) { result += " sidebar-selector-active"; } else if (this.hover) { result += " sidebar-selector-hover"; } return result; }, button_css() { return "sidebar-button"; }, select_app: function() { this.$emit('select-app', {name: this.app}); }, set_hover(hover) { this.hover = hover; } }, template: ` ` });