Skip to content

Commit

Permalink
set styles for light and dark themes
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoventura committed Jan 2, 2025
1 parent f2d3fbc commit 27e8d04
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/components/Monaco/themes/k6StudioDark.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as monaco from 'monaco-editor'
import '../languages/log'

export const k6StudioDarkBackground = '#1E1E1E'

monaco.editor.defineTheme('k6-studio-dark', {
base: 'vs-dark',
inherit: true,
rules: [
{ token: 'error.log', foreground: '#CE9178', fontStyle: 'bold' },
{ token: 'stackTrace.log', foreground: '#CE9178', fontStyle: 'italic' },
{ token: 'timestamp.log', foreground: '#368F2E' },
{ token: 'string.log', foreground: '#CE9178' },
],
colors: {
'editor.background': k6StudioDarkBackground,
},
})
8 changes: 7 additions & 1 deletion src/components/Monaco/themes/k6StudioLight.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import * as monaco from 'monaco-editor'
import '../languages/log'

export const k6StudioLightBackground = '#fafafa'

monaco.editor.defineTheme('k6-studio-light', {
base: 'vs',
inherit: true,
rules: [],
rules: [
{ token: 'error.log', foreground: '#A6201E', fontStyle: 'bold' },
{ token: 'stackTrace.log', foreground: '#A6201E', fontStyle: 'italic' },
{ token: 'timestamp.log', foreground: '#368F2E' },
{ token: 'string.log', foreground: '#A6201E' },
],
colors: {
'editor.background': k6StudioLightBackground,
},
Expand Down

0 comments on commit 27e8d04

Please sign in to comment.