Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszjedrasik committed Mar 29, 2021
1 parent e41170e commit 0fc6e24
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 34 deletions.
9 changes: 0 additions & 9 deletions packages/commercetools/theme/components/Header/MobileMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,3 @@ export default {
}
};
</script>

<style lang='scss'>
.sf-mega-menu__bar.sf-bar {
display: flex;
@include for-desktop {
display: none;
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import { SfBottomNavigation, SfIcon, SfCircleIcon } from '@storefront-ui/vue';
import { useUiState } from '~/composables';
import { useUser } from '<%= options.generate.replace.composables %>';
import { watch } from '@vue/composition-api';
export default {
components: {
Expand All @@ -54,6 +55,11 @@ export default {
if (isMobileMenuOpen.value) toggleMobileMenu();
};
watch(isMobileMenuOpen, () => {
if (isMobileMenuOpen.value) document.body.classList.add('no-scroll');
else document.body.classList.remove('no-scroll');
});
return {
toggleWishlistSidebar,
toggleCartSidebar,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ export default {
opacity: 1;
visibility: visible;
overflow-y: auto;
overflow-x: hidden;
top: 0;
z-index: 1;
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,3 @@ export default {
}
};
</script>

<style lang='scss'>
.sf-mega-menu__bar.sf-bar {
display: flex;
@include for-desktop {
display: none;
}
}
</style>
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
<template>
<SfMegaMenuColumn
title="Featured"
class="sf-mega-menu-column--pined-content-on-mobile sf-mega-menu-column--hide-header-on-mobile sb-mega-menu__featured"
>
<div class="sb-mega-menu__banners">
<SfBanner
v-for="(banner, key) in banners"
:key="key"
:title="banner.title"
:subtitle="banner.subtitle"
:image="banner.pictures"
class="sb-mega-menu__banner"
/>
</div>
</SfMegaMenuColumn>
<div class="sb-mega-menu__banners">
<SfBanner
v-for="(banner, key) in banners"
:key="key"
:title="banner.title"
:subtitle="banner.subtitle"
:image="banner.pictures"
class="sb-mega-menu__banner"
/>
</div>
</template>

<script>
Expand Down

0 comments on commit 0fc6e24

Please sign in to comment.