forked from coracle/flotilla
Add mobile nav notification badges
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
<script lang="ts">
|
||||
import {sleep} from "@welshman/lib"
|
||||
|
||||
export let delay = 1
|
||||
</script>
|
||||
|
||||
{#await sleep(delay)}
|
||||
<!-- pass -->
|
||||
{:then}
|
||||
<slot />
|
||||
{/await}
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user