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

Commit

Permalink
Merge pull request #46 from pvdthings/fix-donations-button-wrap
Browse files Browse the repository at this point in the history
Hide donation button icon under 376 screen width
  • Loading branch information
dillonfagan authored Aug 22, 2023
2 parents 4f01d5f + 3659e8e commit 6196520
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib/views/WishListButtonView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,21 @@
import { t } from "$lib/language/translate";
import { wishListFilter } from "$lib/stores/catalog";
let innerWidth;
$: showIcon = innerWidth > 376;
const toggleWishList = () => {
$wishListFilter = !$wishListFilter;
};
</script>

<svelte:window bind:innerWidth />

{#key $wishListFilter}
<Button
on:click={toggleWishList}
icon={EyeOffIcon}
selectedIcon={EyeIcon}
icon={showIcon ? EyeOffIcon : undefined}
selectedIcon={showIcon ? EyeIcon : undefined}
theme={ButtonTheme.default}
text={$t('Button.WishList')}
selected={$wishListFilter}
Expand Down

0 comments on commit 6196520

Please sign in to comment.