Skip to content

Commit 9bb6bec

Browse files
committed
Implement info diagnostic level in the demo panel
Info diagnostics were displayed as error in the problems panel. Now they are displayed as info.
1 parent d472fd9 commit 9bb6bec

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

examples/demo/src/index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
--error-color: hsl(0, 85%, 62%);
55
--foreground-color: hsl(0, 0%, 0%);
66
--header-foreground-color: hsl(0, 0%, 0%);
7+
--info-color: hsl(212, 100%, 61%);
78
--primary-color: hsl(189, 100%, 63%);
89
--shadow-color: hsla(0, 0%, 27%, 0.239);
910
--scrollbar-color: hsla(0, 0%, 47%, 0.4);
@@ -124,6 +125,10 @@ main {
124125
margin-left: 0.5rem;
125126
}
126127

128+
.problem .codicon-info {
129+
color: var(--info-color);
130+
}
131+
127132
.problem .codicon-warning {
128133
color: var(--warning-color);
129134
}

examples/demo/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,11 @@ editor.onDidChangeMarkers(([resource]) => {
260260
wrapper.classList.add('problem')
261261
codicon.classList.add(
262262
'codicon',
263-
marker.severity === MarkerSeverity.Warning ? 'codicon-warning' : 'codicon-error'
263+
marker.severity === MarkerSeverity.Info
264+
? 'codicon-info'
265+
: marker.severity === MarkerSeverity.Warning
266+
? 'codicon-warning'
267+
: 'codicon-error'
264268
)
265269
text.classList.add('problem-text')
266270
text.textContent = marker.message

0 commit comments

Comments
 (0)