The API reference is a Work in Progress and will be continuously improved and extended. We'd love to hear your feedback in our documentation repository.

Home > @edtr-io/ui > createEditorUiTheme

createEditorUiTheme() function

Creates a function that maps EditorThemeProps to the current theme of the specified editor UI component

export declare function createEditorUiTheme<K extends keyof EditorUiTheme>(
  key: K,
  createDefaultTheme: EditorUiThemeFactory<K>
): (theme: {
  editor: EditorTheme
  editorUi: DeepPartial<EditorUiTheme>
}) => EditorUiTheme[K]


keyKThe editor UI component
createDefaultThemeEditorUiThemeFactory<K>The factory for the default theme

(theme: { editor: EditorTheme; editorUi: DeepPartial<EditorUiTheme>; }) => EditorUiTheme[K]

A function that accepts EditorThemeProps and returns the current theme of the specified component