Merge pull request #16 from jcreek/2-replace-navbar-with-a-better-one

feat(#2): Begin replacing navbar
This commit is contained in:
Josh Creek
2024-06-18 19:53:03 +01:00
committed by GitHub
2 changed files with 28 additions and 23 deletions
+23
View File
@@ -0,0 +1,23 @@
<script lang="ts">
export let isMobile: boolean = false;
</script>
<li><a href="/products">Products</a></li>
<li class={isMobile ? '' : 'dropdown'}>
{#if isMobile}
<div tabindex="0" role="button" class="">Parent</div>
{:else}
<details>
<summary>Parent</summary>
</details>
{/if}
<ul
class="{isMobile
? ''
: 'dropdown-content rounded-box w-52 shadow'} z-[1] menu p-2 bg-base-100 text-base-content"
>
<li><a href="/">Submenu 1</a></li>
<li><a href="/">Submenu 2</a></li>
</ul>
</li>
<li><a href="/">Item 3</a></li>