diff options
| author | Henry Jameson <me@hjkos.com> | 2020-05-27 03:32:57 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2020-05-27 03:32:57 +0300 |
| commit | 5ffcddd3b9b4b6600e4e51066b9410d7e852df11 (patch) | |
| tree | c99a080c48c51beb84140711c855eb1e19549a0c /src/components/tab_switcher/tab_switcher.js | |
| parent | 3938ccb8e77afa33ebae2a00b74145399322a060 (diff) | |
fixes. sorry for bad commit message i'm tired
Diffstat (limited to 'src/components/tab_switcher/tab_switcher.js')
| -rw-r--r-- | src/components/tab_switcher/tab_switcher.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/components/tab_switcher/tab_switcher.js b/src/components/tab_switcher/tab_switcher.js index 2d04e15d..616f1a19 100644 --- a/src/components/tab_switcher/tab_switcher.js +++ b/src/components/tab_switcher/tab_switcher.js @@ -95,9 +95,12 @@ export default Vue.component('tab-switcher', { disabled={slot.data.attrs.disabled} onClick={this.activateTab(index)} class={classesTab.join(' ')} + type="button" > {!slot.data.attrs.icon ? '' : (<i class={'tab-icon icon-' + slot.data.attrs.icon}/>)} - {slot.data.attrs.label} + <span class="text"> + {slot.data.attrs.label} + </span> </button> </div> ) @@ -110,13 +113,23 @@ export default Vue.component('tab-switcher', { if (slot.data.attrs.fullHeight) { classes.push('full-height') } + const newSlot = ( + <div class={classes}> + { + this.sideTabBar + ? <h1 class="mobile-label">{slot.data.attrs.label}</h1> + : '' + } + {slot} + </div> + ) if (this.renderOnlyFocused) { return active - ? <div class={classes.join(' ')}>{slot}</div> + ? <div class={classes.join(' ')}>{newSlot}</div> : <div class={classes.join(' ')}></div> } - return <div class={classes.join(' ')}>{slot}</div> + return <div class={classes.join(' ')}>{newSlot}</div> }) return ( |
