mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-15 11:25:17 +00:00
web/DonateOptionsCard: update buttons on wheel too
This commit is contained in:
parent
6ba27f8369
commit
ebf2d493aa
|
@ -169,7 +169,12 @@
|
|||
<div
|
||||
id="donation-options"
|
||||
bind:this={donateList}
|
||||
on:scroll={(e) => {}}
|
||||
on:wheel={() => {
|
||||
const currentPos = donateList.scrollLeft;
|
||||
const maxPos = donateList.scrollWidth - donateList.getBoundingClientRect().width;
|
||||
showLeftScroll = currentPos > 0;
|
||||
showRightScroll = currentPos < maxPos && currentPos !== maxPos;
|
||||
}}
|
||||
>
|
||||
{#each Object.entries(PRESET_DONATION_AMOUNTS) as [amount, component]}
|
||||
<DonationOption
|
||||
|
|
Loading…
Reference in a new issue