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

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

Parameters

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

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

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