aboutsummaryrefslogtreecommitdiff
path: root/src/components/tab_switcher
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/tab_switcher')
-rw-r--r--src/components/tab_switcher/tab_switcher.js7
-rw-r--r--src/components/tab_switcher/tab_switcher.scss5
2 files changed, 10 insertions, 2 deletions
diff --git a/src/components/tab_switcher/tab_switcher.js b/src/components/tab_switcher/tab_switcher.js
index bd1f51cb..2d04e15d 100644
--- a/src/components/tab_switcher/tab_switcher.js
+++ b/src/components/tab_switcher/tab_switcher.js
@@ -94,8 +94,11 @@ export default Vue.component('tab-switcher', {
<button
disabled={slot.data.attrs.disabled}
onClick={this.activateTab(index)}
- class={classesTab.join(' ')}>
- {slot.data.attrs.label}</button>
+ class={classesTab.join(' ')}
+ >
+ {!slot.data.attrs.icon ? '' : (<i class={'tab-icon icon-' + slot.data.attrs.icon}/>)}
+ {slot.data.attrs.label}
+ </button>
</div>
)
})
diff --git a/src/components/tab_switcher/tab_switcher.scss b/src/components/tab_switcher/tab_switcher.scss
index f994380f..129a68b7 100644
--- a/src/components/tab_switcher/tab_switcher.scss
+++ b/src/components/tab_switcher/tab_switcher.scss
@@ -3,6 +3,11 @@
.tab-switcher {
display: flex;
+ .tab-icon {
+ font-size: 2em;
+ display: block;
+ }
+
&.top-tabs {
flex-direction: column;
> .tabs {