From 3352727aa638fcfcc6461d2aaded8ef9603acc0d Mon Sep 17 00:00:00 2001
From: ivarlovlie <git@ivarlovlie.no>
Date: Tue, 4 Oct 2022 00:04:19 +0800
Subject: feat: Initial setup facilitating testing

---
 apps/kit/src/lib/components/alert.svelte | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'apps/kit/src/lib/components/alert.svelte')

diff --git a/apps/kit/src/lib/components/alert.svelte b/apps/kit/src/lib/components/alert.svelte
index 31e7357..fd57105 100644
--- a/apps/kit/src/lib/components/alert.svelte
+++ b/apps/kit/src/lib/components/alert.svelte
@@ -2,6 +2,7 @@
     import { random_string } from "$lib/helpers";
     import { createEventDispatcher } from "svelte";
     import { onMount } from "svelte";
+    import pwKey from "$actions/pwKey";
     import { Temporal } from "temporal-polyfill";
     import { ExclamationTriangleIcon, CheckCircleIcon, InformationCircleIcon, XCircleIcon, XMarkIcon } from "./icons";
 
@@ -61,10 +62,12 @@
     $: cooldownEnabled =
         id.indexOf(noCooldownSetting) === -1 && closeable && (closeableCooldown === "~" || parseInt(closeableCooldown) > 0);
     /**
-     * Sets this alerts visibility state, when this is false it is removed from the dom using svelte a {#if} block.
+     * Sets this alerts visibility state, when this is false it is removed from the dom using an {#if} block.
      */
     export let visible = closeableCooldown === "~" || parseInt(closeableCooldown) > 0 ? false : true;
 
+    export let _pwKey: string | undefined = undefined;
+
     const cooldownStorageKey = "lastseen--" + id;
 
     $: switch (type) {
@@ -160,7 +163,7 @@
 </script>
 
 {#if visible}
-    <div class="rounded-md bg-{colorClassPart}-50 p-4 {$$restProps.class ?? ''}">
+    <div class="rounded-md bg-{colorClassPart}-50 p-4 {$$restProps.class ?? ''}" use:pwKey={_pwKey}>
         <div class="flex">
             <div class="flex-shrink-0">
                 <svelte:component this={iconComponent} class="text-{colorClassPart}-400" />
-- 
cgit v1.3

