diff options
| author | Kit La Touche <kit@transneptune.net> | 2024-10-09 15:32:52 -0400 |
|---|---|---|
| committer | Kit La Touche <kit@transneptune.net> | 2024-10-09 15:32:52 -0400 |
| commit | bd53a51af835478d23bef4772ce7e50553dc3fdf (patch) | |
| tree | 3f190a47b9f704c412d0ff684b959abf003b8e5b /hi-ui/src/lib/components/Channel.svelte | |
| parent | dd62b823e01934a0f841256fdb17b551091896bf (diff) | |
Move a lot of things around
Diffstat (limited to 'hi-ui/src/lib/components/Channel.svelte')
| -rw-r--r-- | hi-ui/src/lib/components/Channel.svelte | 21 |
1 files changed, 21 insertions, 0 deletions
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> |
