formatHeading colors a heading based on the group-by field and key value.
(key, groupBy string, r *lipgloss.Renderer)
| 120 | |
| 121 | // formatHeading colors a heading based on the group-by field and key value. |
| 122 | func formatHeading(key, groupBy string, r *lipgloss.Renderer) string { |
| 123 | var style lipgloss.Style |
| 124 | switch groupBy { |
| 125 | case "status": |
| 126 | style = getStatusColor(key, r) |
| 127 | case "priority": |
| 128 | style = getPriorityColor(key, r) |
| 129 | case "effort": |
| 130 | style = getEffortColor(key, r) |
| 131 | case "type": |
| 132 | style = getTypeColor(key, r) |
| 133 | default: |
| 134 | style = r.NewStyle().Bold(true) |
| 135 | } |
| 136 | return style.Render(key) |
| 137 | } |
| 138 | |
| 139 | // formatStatus formats status text with status-based color. |
| 140 | func formatStatus(status string, r *lipgloss.Renderer) string { |