diff options
| author | Henry Jameson <me@hjkos.com> | 2021-04-18 15:39:06 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2021-04-18 15:39:06 +0300 |
| commit | 33777fab47b65975d343d219c0b1866ba6849b3f (patch) | |
| tree | 19a8a4aad498fc84c37a258bc570bd8a455ee819 /src/components/tab_switcher | |
| parent | b0789fd6fd280a3dc8cefb4cb2410abec4be9ae6 (diff) | |
small refactoring to uncouple tab-switcher from settings modal
Diffstat (limited to 'src/components/tab_switcher')
| -rw-r--r-- | src/components/tab_switcher/tab_switcher.jsx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/components/tab_switcher/tab_switcher.jsx b/src/components/tab_switcher/tab_switcher.jsx index 44221d50..2869e59c 100644 --- a/src/components/tab_switcher/tab_switcher.jsx +++ b/src/components/tab_switcher/tab_switcher.jsx @@ -33,6 +33,11 @@ export default { required: false, type: Boolean, default: false + }, + bodyScrollLock: { + required: false, + type: Boolean, + default: false } }, data () { @@ -50,9 +55,6 @@ export default { return this.active } }, - settingsModalVisible () { - return this.settingsModalState === 'visible' - }, ...mapState({ settingsModalState: state => state.interface.settingsModalState }) @@ -161,7 +163,11 @@ export default { <div class="tabs"> {tabs} </div> - <div ref="contents" class={'contents' + (this.scrollableTabs ? ' scrollable-tabs' : '')} v-body-scroll-lock={this.settingsModalVisible}> + <div + ref="contents" + class={'contents' + (this.scrollableTabs ? ' scrollable-tabs' : '')} + v-body-scroll-lock={this.bodyScrollLock} + > {contents} </div> </div> |
