Interface: IColorThemeService
molecule.IColorThemeService
Implemented by
Methods
addThemes
▸ addThemes(themes): void
Add themes into colorThemes
This will update the duplicated themes found in colorThemes
Parameters
| Name | Type |
|---|---|
themes | IColorTheme | IColorTheme[] |
Returns
void
Defined in
services/theme/colorThemeService.ts:29
getColorTheme
▸ getColorTheme(): IColorTheme
Get the current Color Theme
Returns
Defined in
services/theme/colorThemeService.ts:53
getColorThemeMode
▸ getColorThemeMode(): ColorThemeMode
Get the mode('dark' or 'light') of the current Color Theme
Returns
Defined in
services/theme/colorThemeService.ts:65
getThemeById
▸ getThemeById(id): undefined | IColorTheme
Get specific theme via id
Parameters
| Name | Type |
|---|---|
id | string |
Returns
undefined | IColorTheme
Defined in
services/theme/colorThemeService.ts:49
getThemes
▸ getThemes(): IColorTheme[]
Get all themes in colorThemes
Returns
Defined in
services/theme/colorThemeService.ts:44
onChange
▸ onChange(callback): void
Listen to the theme changed event
Parameters
| Name | Type |
|---|---|
callback | (prev: IColorTheme, next: IColorTheme, themeMode: ColorThemeMode) => void |
Returns
void
Defined in
services/theme/colorThemeService.ts:70
reload
▸ reload(): void
Reload current theme
Returns
void
Defined in
services/theme/colorThemeService.ts:57
reset
▸ reset(): void
Reset theme
Returns
void
Defined in
services/theme/colorThemeService.ts:61
setTheme
▸ setTheme(id): void
Set the current Color Theme via id,
Please ensure the theme could be found in colorThemes
Parameters
| Name | Type | Description |
|---|---|---|
id | string | The id is required |
Returns
void
Defined in
services/theme/colorThemeService.ts:35
updateTheme
▸ updateTheme(theme): void
Update specific theme,
Parameters
| Name | Type | Description |
|---|---|---|
theme | IColorTheme | The id is required in theme |
Returns
void