mirror of https://github.com/cupcakearmy/ora.git
20 lines
320 B
Svelte
20 lines
320 B
Svelte
<script>
|
|
import { onMount } from 'svelte'
|
|
import { scale } from 'svelte/transition'
|
|
|
|
export let toast
|
|
|
|
let show = true
|
|
onMount(() => {
|
|
setTimeout(() => {
|
|
show = false
|
|
}, 3000)
|
|
})
|
|
</script>
|
|
|
|
{#if show}
|
|
<div class="toast toast-{toast.type}" transition:scale>
|
|
{toast.message}
|
|
</div>
|
|
{/if}
|