From bd53a51af835478d23bef4772ce7e50553dc3fdf Mon Sep 17 00:00:00 2001
From: Kit La Touche <kit@transneptune.net>
Date: Wed, 9 Oct 2024 15:32:52 -0400
Subject: Move a lot of things around

---
 hi-ui/src/lib/components/Channel.svelte | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 hi-ui/src/lib/components/Channel.svelte

(limited to 'hi-ui/src/lib/components/Channel.svelte')

diff --git a/hi-ui/src/lib/components/Channel.svelte b/hi-ui/src/lib/components/Channel.svelte
new file mode 100644
index 0000000..97fea1f
--- /dev/null
+++ b/hi-ui/src/lib/components/Channel.svelte
@@ -0,0 +1,21 @@
+<script>
+    import { activeChannel } from '$lib/store';
+
+    export let id;
+    export let name;
+    let active = false;
+
+    activeChannel.subscribe((value) => {
+        active = value.is(id);
+    });
+</script>
+
+<li
+    class="rounded-full"
+    class:bg-slate-400={active}
+>
+<a href="/ch/{id}">
+    <span class="badge bg-primary-500">#</span>
+    <span class="flex-auto">{name}</span>
+</a>
+</li>
-- 
cgit v1.2.3

