summaryrefslogtreecommitdiff
path: root/ui/lib/components/Channel.svelte
blob: 97fea1f15834112d50919c38c584325e10ce9f73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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>