Skip to main content
Access via:io.themes

4 Methods

getCurrent()⚓︎

() => Promise<Theme>

Returns the current theme.

list()⚓︎

() => Promise<Theme[]>

Returns list of available themes

onChanged()⚓︎

(callback: (theme: Theme) => any) => UnsubscribeFunction

Notifies you when the theme is changed.

Parameters (1)

Name Type Required Description
callback⚓︎ (theme: Theme) => any

Callback to handle the event. Receives the theme object as an argument.

Returns

Unsubscribe function.

select()⚓︎

(name: string) => Promise<void>

Selects a new theme

Parameters (1)

Name Type Required Description
name⚓︎ string

The name of the theme