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

Commit

Permalink
Hide donation button icon under 376 screen width
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonfagan committed Aug 22, 2023
1 parent 4f01d5f commit 3659e8e
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 3659e8e

Please sign in to comment.