MCPcopy Index your code
hub / github.com/stackblitz/bolt.new / getTheme

Function getTheme

app/components/editor/codemirror/cm-theme.ts:10–15  ·  view source on GitHub ↗
(theme: Theme, settings: EditorSettings = {})

Source from the content-addressed store, hash-verified

8export const themeSelection = new Compartment();
9
10export function getTheme(theme: Theme, settings: EditorSettings = {}): Extension {
11 return [
12 getEditorTheme(settings),
13 theme === 'dark' ? themeSelection.of([getDarkTheme()]) : themeSelection.of([getLightTheme()]),
14 ];
15}
16
17export function reconfigureTheme(theme: Theme) {
18 return themeSelection.reconfigure(theme === 'dark' ? getDarkTheme() : getLightTheme());

Callers 1

newEditorStateFunction · 0.90

Calls 3

getEditorThemeFunction · 0.85
getDarkThemeFunction · 0.85
getLightThemeFunction · 0.85

Tested by

no test coverage detected