Implement notification box for web (#533)

* Added test button

* styling notification box

* Added auto dismission and animation to each notificaiont list

* Remove test button
This commit is contained in:
Alex
2022-08-25 23:04:23 -07:00
committed by GitHub
parent 68b1655e7f
commit f9b1b12b10
6 changed files with 132 additions and 4 deletions

View File

@@ -0,0 +1,22 @@
<script lang="ts">
import { notificationList } from './notification';
import { fade } from 'svelte/transition';
import NotificationCard from './notification-card.svelte';
import { flip } from 'svelte/animate';
import { quintOut } from 'svelte/easing';
</script>
{#if $notificationList?.length > 0}
<section
transition:fade={{ duration: 250 }}
id="notification-list"
class="absolute right-5 top-[80px] z-[99999999]"
>
{#each $notificationList as notificationInfo (notificationInfo.id)}
<div animate:flip={{ duration: 250, easing: quintOut }}>
<NotificationCard {notificationInfo} />
</div>
{/each}
</section>
{/if}