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 > createRendererUiTheme

createRendererUiTheme() function

Creates a function that maps RendererThemeProps to the current theme of the specified renderer UI component

Signature:
export declare function createRendererUiTheme<K extends keyof RendererUiTheme>(
  key: K,
  createDefaultTheme: RendererUiThemeFactory<K>
): (theme: {
  renderer: RendererTheme
  rendererUi: DeepPartial<RendererUiTheme>
}) => RendererUiTheme[K]

Parameters

ParameterTypeDescription
keyKThe renderer UI component
createDefaultThemeRendererUiThemeFactory<K>The factory for the default theme
Returns:

(theme: { renderer: RendererTheme; rendererUi: DeepPartial<RendererUiTheme>; }) => RendererUiTheme[K]

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