<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}
