(kind: StackLineCell["kind"], theme: AppTheme, selected: boolean)
| 33 | |
| 34 | /** Pick the stack-view rail color for one rendered row. */ |
| 35 | export function stackRailColor(kind: StackLineCell["kind"], theme: AppTheme, selected: boolean) { |
| 36 | let color: string; |
| 37 | |
| 38 | if (kind === "addition") { |
| 39 | color = theme.addedSignColor; |
| 40 | } else if (kind === "deletion") { |
| 41 | color = theme.removedSignColor; |
| 42 | } else { |
| 43 | color = neutralRailColor(theme); |
| 44 | } |
| 45 | |
| 46 | return selected ? color : dimRailColor(color, theme); |
| 47 | } |
| 48 | |
| 49 | /** Pick the left split-view rail color from the old-side cell state. */ |
| 50 | export function splitLeftRailColor( |
no test coverage detected