Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 1x 1x 1x | import type { Environment } from "../../../src/config"
/**
* Gets the appropriate color for the current environment.
*
* Environment color scheme:
* - Local: Yellow/orange (warning color) - indicates development/experimental environment
* - Staging: Blue (focus border) - indicates stable testing environment
* - Production: Default VSCode colors - standard appearance
*
* @param environment - The current environment (local, staging, or production)
* @param type - The type of color needed: "primary" for text/fills, "border" for borders
* @returns CSS variable string for the appropriate environment color
*/
export const getEnvironmentColor = (environment: Environment | undefined, type: "primary" | "border" = "primary"): string => {
if (type === "border") {
return environment === "local"
? "var(--vscode-activityWarningBadge-background)" // Yellow/orange for local
: environment === "staging"
? "var(--vscode-focusBorder)" // Blue for staging
: "var(--vscode-editorGroup-border)" // Default for production
}
return environment === "local"
? "var(--vscode-activityWarningBadge-background)" // Yellow/orange for local
: environment === "staging"
? "var(--vscode-focusBorder)" // Blue for staging
: "var(--vscode-foreground)" // Default for production
}
|