MCPcopy Create free account
hub / github.com/modem-dev/hunk / stackRailColor

Function stackRailColor

src/ui/diff/rowStyle.ts:35–47  ·  view source on GitHub ↗
(kind: StackLineCell["kind"], theme: AppTheme, selected: boolean)

Source from the content-addressed store, hash-verified

33
34/** Pick the stack-view rail color for one rendered row. */
35export 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. */
50export function splitLeftRailColor(

Callers 2

renderStaticStackRowFunction · 0.90
renderRowFunction · 0.90

Calls 2

neutralRailColorFunction · 0.85
dimRailColorFunction · 0.85

Tested by

no test coverage detected