Skip to content

Commit 53a17d5

Browse files
committed
Use better color variables for alerts
1 parent 160a0ae commit 53a17d5

1 file changed

Lines changed: 8 additions & 17 deletions

File tree

  • extensions/ql-vscode/src/view/common

extensions/ql-vscode/src/view/common/Alert.tsx

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,23 @@ const getBackgroundColor = ({ type, inverse }: ContainerProps): string => {
2222

2323
const getTextColor = ({ type, inverse }: ContainerProps): string => {
2424
if (!inverse) {
25-
return 'var(--vscode-tab-activeForeground)';
25+
return 'var(--vscode-editor-foreground)';
2626
}
2727

2828
switch (type) {
2929
case 'warning':
30-
return 'var(--vscode-panel-background)';
30+
return 'var(--vscode-editor-background)';
3131
case 'error':
3232
return 'var(--vscode-list-activeSelectionForeground)';
3333
}
3434
};
3535

36-
const getBorderColor = ({ type, inverse }: ContainerProps): string => {
37-
if (inverse) {
38-
switch (type) {
39-
case 'warning':
40-
return 'var(--vscode-inputValidation-warningBorder)';
41-
case 'error':
42-
return 'var(--vscode-inputValidation-errorBorder)';
43-
}
44-
} else {
45-
switch (type) {
46-
case 'warning':
47-
return 'var(--vscode-notificationsWarningIcon-foreground)';
48-
case 'error':
49-
return 'var(--vscode-notificationsErrorIcon-foreground)';
50-
}
36+
const getBorderColor = ({ type }: ContainerProps): string => {
37+
switch (type) {
38+
case 'warning':
39+
return 'var(--vscode-editorWarning-foreground)';
40+
case 'error':
41+
return 'var(--vscode-editorError-foreground)';
5142
}
5243
};
5344

0 commit comments

Comments
 (0)