MCPcopy Create free account
hub / github.com/pingdotgg/t3code / ThreadStatusLabel

Function ThreadStatusLabel

apps/web/src/components/ThreadStatusIndicators.tsx:132–181  ·  view source on GitHub ↗
({
  status,
  compact = false,
}: {
  status: ThreadStatusPill;
  compact?: boolean;
})

Source from the content-addressed store, hash-verified

130}
131
132export function ThreadStatusLabel({
133 status,
134 compact = false,
135}: {
136 status: ThreadStatusPill;
137 compact?: boolean;
138}) {
139 if (compact) {
140 return (
141 <Tooltip>
142 <TooltipTrigger
143 render={
144 <span
145 aria-label={status.label}
146 className={`inline-flex size-3.5 shrink-0 items-center justify-center ${status.colorClass}`}
147 />
148 }
149 >
150 <span
151 className={`size-[9px] rounded-full ${status.dotClass} ${
152 status.pulse ? "animate-pulse" : ""
153 }`}
154 />
155 </TooltipTrigger>
156 <TooltipPopup side="top">{status.label}</TooltipPopup>
157 </Tooltip>
158 );
159 }
160
161 return (
162 <Tooltip>
163 <TooltipTrigger
164 render={
165 <span
166 aria-label={status.label}
167 className={`inline-flex items-center gap-1 text-[10px] ${status.colorClass}`}
168 />
169 }
170 >
171 <span
172 className={`h-1.5 w-1.5 rounded-full ${status.dotClass} ${
173 status.pulse ? "animate-pulse" : ""
174 }`}
175 />
176 <span className="hidden md:inline">{status.label}</span>
177 </TooltipTrigger>
178 <TooltipPopup side="top">{status.label}</TooltipPopup>
179 </Tooltip>
180 );
181}
182
183/**
184 * Non-interactive leading status icons for a thread row in compact contexts

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected