Skip to content

Commit

Permalink
add scroll icon to mobile area view
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght committed May 20, 2024
1 parent 78172c3 commit 2edba08
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/components/AreaPage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
const sections = Object.values(Sections);
let activeSection = Sections.merchants;
let scrolled = false;
let dataInitialized = false;
Expand Down Expand Up @@ -400,7 +401,10 @@
{/if}
</section>

<div class="hide-scroll grid w-full auto-cols-[minmax(150px,_1fr)] grid-flow-col overflow-x-auto">
<div
on:scroll={() => (scrolled = true)}
class="hide-scroll relative grid w-full auto-cols-[minmax(150px,_1fr)] grid-flow-col overflow-x-auto"
>
{#each sections as section}
<button
on:click={() => (activeSection = section)}
Expand All @@ -412,6 +416,14 @@
{section}
</button>
{/each}

{#if !scrolled}
<div
class="absolute right-0 top-0 flex h-8 w-8 items-center justify-center rounded-full bg-[#cce3e6] sm:hidden"
>
<i class="fa-solid fa-chevron-right text-link" />
</div>
{/if}
</div>

{#if activeSection === Sections.merchants}
Expand Down

0 comments on commit 2edba08

Please sign in to comment.