renderTypeBadge function presentation exported ✓ 100.0%
Last updated: 2026-03-04T23:21:38.426Z
Location
Metrics
LOC: 4
Complexity: 2
Params: 2
Coverage: 100.0% (2/2 lines, 7x executed)
Signature
renderTypeBadge(type: string, prefix = ""): : string
Summary
Renders a colored badge for a field type.
Source Code
export function renderTypeBadge(type: string, prefix = ""): string {
const color = TYPE_COLORS[type] ?? "#64748b";
return `<span class="${prefix}type-badge" style="background:${color}">${escapeHtml(type)}</span>`;
}
Dependencies (Outgoing)
| Target | Type |
|---|---|
| DetectedFieldSummary | uses |
| SavedForm | uses |
| escapeAttr | uses |
| getConfidenceColor | uses |
| escapeHtml | calls |
Impact (Incoming)
| Source | Type |
|---|---|
| renderFieldRow | calls |