Mobile navbar

This commit is contained in:
Aleksi Lassila
2023-08-06 21:12:39 +03:00
parent 1a6e33c1ce
commit 46ec52334b
4 changed files with 79 additions and 14 deletions

View File

@@ -10,7 +10,7 @@
let scrollX = 0;
</script>
<div class="flex justify-between items-center mx-8 gap-4">
<div class="flex justify-between items-center mx-2 sm:mx-8 gap-4">
<slot name="title">
<div class="font-semibold text-xl">{heading}</div>
</slot>
@@ -34,7 +34,7 @@
<div class="relative">
<div
class="flex overflow-x-scroll items-center overflow-y-hidden gap-4 relative px-8 scrollbar-hide py-4"
class="flex overflow-x-scroll items-center overflow-y-hidden gap-4 relative px-2 sm:px-8 scrollbar-hide py-4"
bind:this={carousel}
tabindex="-1"
on:scroll={() => (scrollX = carousel?.scrollLeft || scrollX)}