From 4401dce2b5545ce8117818812d8e3c8919f5f7fd Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Thu, 10 Oct 2024 21:05:48 -0400
Subject: Remove redundancy in `hi-ui` directory name.

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

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

diff --git a/ui/src/lib/components/Channel.svelte b/ui/src/lib/components/Channel.svelte
new file mode 100644
index 0000000..97fea1f
--- /dev/null
+++ b/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

