ThemeApi
Provides run-time access to the Theme Module and associated state
TypeScript
export interfaceMethods
| Method | Returns | Description |
|---|---|---|
| applyCurrentTheme() | void | Applies the Current Theme |
| editTheme(theme) | void | Edits an existing theme |
| getCurrentTheme() | string | Retrieves name of Current Theme |
| getCurrentThemeObject() | AdaptableTheme | Retrieves the current theme object |
| getSystemThemes() | AdaptableTheme[] | Retrieves System Themes in State |
| getThemeByName(themeName) | AdaptableTheme | Retrieves a Theme by name |
| getThemes() | AdaptableTheme[] | Retrieves all Themes (both System & User) in State |
| getThemeState() | ThemeState | Retrieves Theme section from Adaptable State |
| loadDarkTheme() | void | Sets AdapTable Dark Theme - updates the AG Grid theme to match |
| loadLightTheme() | void | Sets AdapTable Light Theme - updates the AG Grid theme to match |
| loadTheme(theme) | void | Sets Adaptable to use a given theme |
| openThemeSettingsPanel() | void | Opens Settings Panel with Theme section selected and visible |
| setSystemThemes(systemThemes) | void | Sets available System Themes; if empty array is passed none will be |
Method Details
applyCurrentTheme
Applies the Current Theme
TypeScript
applyCurrentTheme(): void;Returns
void
editTheme
Edits an existing theme
TypeScript
editTheme(theme: AdaptableTheme): void;Parameters
| Parameter | Type |
|---|---|
| theme | AdaptableTheme |
Returns
void
getCurrentTheme
Retrieves name of Current Theme
TypeScript
getCurrentTheme(): string;Returns
string
getCurrentThemeObject
Retrieves the current theme object
TypeScript
getCurrentThemeObject(): AdaptableTheme;Returns
getSystemThemes
Retrieves System Themes in State
TypeScript
getSystemThemes(): AdaptableTheme[];Returns
getThemeByName
Retrieves a Theme by name
TypeScript
getThemeByName(themeName: string): AdaptableTheme;Parameters
| Parameter | Type | Description |
|---|---|---|
| themeName | string |
Returns
getThemes
Retrieves all Themes (both System & User) in State
TypeScript
getThemes(): AdaptableTheme[];Returns
getThemeState
Retrieves Theme section from Adaptable State
TypeScript
getThemeState(): ThemeState;Returns
loadDarkTheme
Sets AdapTable Dark Theme - updates the AG Grid theme to match
TypeScript
loadDarkTheme(): void;Returns
void
loadLightTheme
Sets AdapTable Light Theme - updates the AG Grid theme to match
TypeScript
loadLightTheme(): void;Returns
void
loadTheme
Sets Adaptable to use a given theme
TypeScript
loadTheme(theme: string): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| theme | string | name of theme to apply |
Returns
void
openThemeSettingsPanel
Opens Settings Panel with Theme section selected and visible
TypeScript
openThemeSettingsPanel(): void;Returns
void
setSystemThemes
Sets available System Themes; if empty array is passed none will be
TypeScript
setSystemThemes(systemThemes: SystemThemeEntry[]): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| systemThemes | SystemThemeEntry[] | system themes to use ('light', 'dark', both, or none) |
Returns
void