From 4dbef3fcd7a14437d55c555cf10d50de8e50d7d1 Mon Sep 17 00:00:00 2001
From: ivarlovlie <git@ivarlovlie.no>
Date: Fri, 9 Dec 2022 11:57:12 +0900
Subject: feat: Move everything out of $lib

---
 .../app/src/components/project-status-badge.svelte | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 code/app/src/components/project-status-badge.svelte

(limited to 'code/app/src/components/project-status-badge.svelte')

diff --git a/code/app/src/components/project-status-badge.svelte b/code/app/src/components/project-status-badge.svelte
new file mode 100644
index 0000000..3e93935
--- /dev/null
+++ b/code/app/src/components/project-status-badge.svelte
@@ -0,0 +1,25 @@
+<script lang="ts">
+    import type {ProjectStatus} from "$models/projects/ProjectStatus";
+    import Badge from "./badge.svelte";
+
+    export let status: string | ProjectStatus;
+
+    let text = "";
+    let type = "default" as any;
+    $: switch (status) {
+        case "idl":
+            type = "tame";
+            text = "IDLE";
+            break;
+        case "exp":
+            type = "yellow";
+            text = "EXPIRED";
+            break;
+        case "act":
+            type = "green";
+            text = "ACTIVE";
+            break;
+    }
+</script>
+
+<Badge {text} {type} uppercase/>
-- 
cgit v1.3

