ThemeAPI interface

An interface representing theme related APIs

Methods

get()

Gets the current theme in use by the application. This theme contains the color, font, depth, border radius, etc. values needed to style the workload to look consistent with the rest of the platform.

onChange((theme: ThemeConfiguration) => void)

Registers to a callback function to respond to updates to the theme of the application

Method Details

get()

Gets the current theme in use by the application. This theme contains the color, font, depth, border radius, etc. values needed to style the workload to look consistent with the rest of the platform.

function get(): Promise<ThemeConfiguration>

Returns

A promise which resolves when the theme is available

onChange((theme: ThemeConfiguration) => void)

Registers to a callback function to respond to updates to the theme of the application

function onChange(callback: (theme: ThemeConfiguration) => void)

Parameters

callback

(theme: ThemeConfiguration) => void

The callback function invoked when the theme of the application is changed