aboutsummaryrefslogtreecommitdiff
path: root/src/components/tab_switcher/tab_switcher.js
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2019-07-26 12:44:32 +0000
committerShpuld Shpludson <shp@cock.li>2019-07-26 12:44:32 +0000
commitd3f6b581d1bbe64d26fceae3f00e9d471ca44dfe (patch)
tree371e786ac95c83d914aa04f22aa9aabfb7b5dc4a /src/components/tab_switcher/tab_switcher.js
parent3370dd80dc4644f2bff053b97b18698cd2abb550 (diff)
parent4827e4d972f8ee11e606693e24ae4ca21711c6b1 (diff)
Merge branch 'develop' into 'feat/conversation-muting'
# Conflicts: # src/components/extra_buttons/extra_buttons.js # src/components/extra_buttons/extra_buttons.vue
Diffstat (limited to 'src/components/tab_switcher/tab_switcher.js')
-rw-r--r--src/components/tab_switcher/tab_switcher.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/components/tab_switcher/tab_switcher.js b/src/components/tab_switcher/tab_switcher.js
index 67835231..a5fe019c 100644
--- a/src/components/tab_switcher/tab_switcher.js
+++ b/src/components/tab_switcher/tab_switcher.js
@@ -45,7 +45,19 @@ export default Vue.component('tab-switcher', {
classesTab.push('active')
classesWrapper.push('active')
}
-
+ if (slot.data.attrs.image) {
+ return (
+ <div class={ classesWrapper.join(' ')}>
+ <button
+ disabled={slot.data.attrs.disabled}
+ onClick={this.activateTab(index)}
+ class={classesTab.join(' ')}>
+ <img src={slot.data.attrs.image} title={slot.data.attrs['image-tooltip']}/>
+ {slot.data.attrs.label ? '' : slot.data.attrs.label}
+ </button>
+ </div>
+ )
+ }
return (
<div class={ classesWrapper.join(' ')}>
<button