Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

fix(default-theme): hide language switcher and currency switcher if only one available (bottom navigation) #1269

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/default-theme/src/components/SwBottomMoreActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@

<div class="content">
<div v-if="!contentChanged" class="content-list">
<SfBottomNavigationItem label="Currency">
<SfBottomNavigationItem
v-if="availableCurrencies.length > 1"
label="Currency"
>
<template #icon>
<SfIcon icon="credits" size="20px" @click="changeCurrency" />
</template>
</SfBottomNavigationItem>

<SfBottomNavigationItem label="Language">
<SfBottomNavigationItem
v-if="availableLanguages.length > 1"
label="Language"
>
<template #icon>
<SfIcon icon="marker" size="20px" @click="changeLanguage" />
</template>
Expand Down