MCPcopy Create free account
hub / github.com/editablejs/editable / useTheme

Function useTheme

packages/plugins/codeblock/src/hooks/use-theme.ts:6–8  ·  view source on GitHub ↗
(view: EditorView | null, theme?: 'light' | 'dark')

Source from the content-addressed store, hash-verified

4import { useExtension } from './use-extension'
5
6export function useTheme(view: EditorView | null, theme?: 'light' | 'dark') {
7 return useExtension(view, () => (theme === 'dark' ? oneDark : baseLight), [theme])
8}

Callers 1

CodeBlockComponentFunction · 0.90

Calls 1

useExtensionFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…