Add mobile nav notification badges

This commit is contained in:
Jon Staab
2024-11-14 12:16:44 -08:00
parent 14ad4ec785
commit 2978d91977
11 changed files with 128 additions and 131 deletions
-11
View File
@@ -1,11 +0,0 @@
<script lang="ts">
import {sleep} from "@welshman/lib"
export let delay = 1
</script>
{#await sleep(delay)}
<!-- pass -->
{:then}
<slot />
{/await}
+6 -6
View File
@@ -17,10 +17,10 @@
class:bg-base-300={active}
class:tooltip={title}
data-tip={title}>
{#if !active && notification}
<div class="absolute right-1 top-1 h-2 w-2 rounded-full bg-primary" />
{/if}
<slot />
{#if !active && notification}
<div class="absolute right-2 top-2 h-2 w-2 rounded-full bg-primary" />
{/if}
</div>
</a>
{:else}
@@ -30,10 +30,10 @@
class:bg-base-300={active}
class:tooltip={title}
data-tip={title}>
{#if !active && notification}
<div class="absolute right-1 top-1 h-2 w-2 rounded-full bg-primary" />
{/if}
<slot />
{#if !active && notification}
<div class="absolute right-2 top-2 h-2 w-2 rounded-full bg-primary" />
{/if}
</div>
</Button>
{/if}