ChannelRow
Leaf row for a channel in the tree — shows a colored prefix (#/!), label, and optional badges.
Import
import { ChannelRow } from "@gumtree/ui/chat/ChannelRow" ; Props
| Prop | Type | Default | Description |
|---|---|---|---|
label* | string | - | Channel name |
type | "auto" | "custom" | "auto" | Channel type — auto (!) or custom (#) |
active | boolean | - | Selected state |
unread | boolean | - | Has unread messages (bold label) |
dim | boolean | - | Dimmed label (for closed/old items) |
italic | boolean | - | Italic label (for placeholders) |
depth | number | 0 | Nesting depth (controls left padding) |
href | string | - | Link URL |
badges | ComponentChildren | - | TreeBadge elements |
Examples
Custom and Auto Channels
Custom channels use green '#', auto channels use orange '!'.
#general
#ci@1
!channel
!1313open
!128merged
< ChannelRow type = "custom" label = "general" depth = { 1 } />
< ChannelRow type = "custom" label = "ci" depth = { 1 } unread
badges = { < TreeBadge variant = "mention" > @1 </ TreeBadge > } />
< ChannelRow type = "auto" label = "channel" depth = { 2 } italic active />
< ChannelRow type = "auto" label = "131" depth = { 3 } unread
badges = { < > < TreeBadge variant = "unread" > 3 </ TreeBadge >
< TreeBadge variant = "state" state = "open" > open </ TreeBadge > </ > } />
< ChannelRow type = "auto" label = "128" depth = { 3 } dim
badges = { < TreeBadge variant = "state" state = "merged" > merged </ TreeBadge > } />