Skip to content

Commit

Permalink
Use background colors
Browse files Browse the repository at this point in the history
  • Loading branch information
jillguyonnet committed Dec 16, 2024
1 parent 3e983e2 commit 5eafbc6
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,19 @@ export function getColorForAgentStatus(
agentStatus: SimplifiedAgentStatus,
euiTheme: EuiThemeComputed<{}>
): string {
// using variables as mentioned here https://eui.elastic.co/#/theming/colors/values
switch (agentStatus) {
case 'healthy':
return euiTheme.colors.success;
return euiTheme.colors.backgroundFilledSuccess;
case 'offline':
return euiTheme.colors.lightShade;
case 'inactive':
return euiTheme.colors.darkShade;
case 'unhealthy':
return euiTheme.colors.warning;
return euiTheme.colors.backgroundFilledWarning;
case 'updating':
return euiTheme.colors.primary;
return euiTheme.colors.backgroundFilledPrimary;
case 'unenrolled':
return euiTheme.colors.disabled;
return euiTheme.colors.backgroundBaseDisabled;
default:
throw new Error(`Unsupported Agent status ${agentStatus}`);
}
Expand Down

0 comments on commit 5eafbc6

Please sign in to comment.