Theemo / @theemo/theme / ThemeManager
Class: ThemeManager
Defined in: manager.ts:93
Manages theming at runtime
- switch themes
- turn features on and off
Properties
activeTheme?
ts
optional activeTheme: Theme;
Defined in: manager.ts:107
The active theme
features
ts
features: FeatureWithValue[] = [];
Defined in: manager.ts:110
Features of the active theme
Accessors
themes
Get Signature
ts
get themes(): Theme[];
Defined in: manager.ts:133
List of available themes
Returns
Theme
[]
Methods
setFeature()
ts
setFeature(featureName, value): void;
Defined in: manager.ts:176
Set the feature to a value
Parameters
Parameter | Type | Description |
---|---|---|
featureName | string | the name of the feature |
value | FeatureValue | the value for that feature |
Returns
void
switchTheme()
ts
switchTheme(name): Promise<void>;
Defined in: manager.ts:215
Switch to another theme
Parameters
Parameter | Type | Description |
---|---|---|
name | string | theme name |
Returns
Promise
<void
>
unsetFeature()
ts
unsetFeature(featureName): void;
Defined in: manager.ts:197
Turn off a feature. Revert to its default.
Parameters
Parameter | Type | Description |
---|---|---|
featureName | string | the name of the feature |
Returns
void