renderActionCard function presentation exported ✓ 100.0%
Last updated: 2026-03-04T23:21:38.426Z
Location
Metrics
LOC: 18
Complexity: 4
Params: 2
Coverage: 100.0% (3/3 lines, 3x executed)
Signature
renderActionCard(card: ActionCardConfig, prefix = ""): : string
Summary
Renders an action-card button (primary / secondary / outline).
Source Code
export function renderActionCard(card: ActionCardConfig, prefix = ""): string {
const variantClass =
card.variant === "primary"
? `${prefix}card-primary`
: card.variant === "secondary"
? `${prefix}card-secondary`
: `${prefix}card-outline`;
const activeClass = card.active ? " active" : "";
return `
<button class="${prefix}action-card ${variantClass}${activeClass}" id="${card.id}">
<span class="${prefix}card-icon">${card.icon}</span>
<span class="${prefix}card-label">${card.label}</span>
<span class="${prefix}card-desc">${card.desc}</span>
</button>
`;
}
No outgoing dependencies.
No incoming dependencies.