Members
(static, constant) Theme
A facade to the underlying theming system that supports different storage implementations.
- Source:
- <<<<<<< HEAD:docs/api/client/module-theme_Theme.html theme/Theme.js, line 135 ======= theme/Theme.js, line 134 >>>>>>> main:docs/public/api/client/module-theme_Theme.html
Methods
(inner) current() → {null|string}
Get the name of the current applied theme in DOM
- Source:
- <<<<<<< HEAD:docs/api/client/module-theme_Theme.html theme/Theme.js, line 79 ======= theme/Theme.js, line 78 >>>>>>> main:docs/public/api/client/module-theme_Theme.html
Returns:
- Type
- null | string
(async, inner) init(options) → {Promise.<{from: string, name: string}>}
Auto-detects stored decision for the theme and falls back to system level preference. Otherwise, uses light theme.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
- Source:
- <<<<<<< HEAD:docs/api/client/module-theme_Theme.html theme/Theme.js, line 33 ======= theme/Theme.js, line 32 >>>>>>> main:docs/public/api/client/module-theme_Theme.html
Returns:
the name of the decision used for the theme.
- Type
- Promise.<{from: string, name: string}>
(inner) is(name) → {boolean}
Check if current applied theme (in DOM) is the theme of the given name
Parameters:
Name | Type | Description |
---|---|---|
name |
string |
- Source:
- <<<<<<< HEAD:docs/api/client/module-theme_Theme.html theme/Theme.js, line 72 ======= theme/Theme.js, line 71 >>>>>>> main:docs/public/api/client/module-theme_Theme.html
Returns:
- Type
- boolean
(async, inner) remove() → {Promise.<*>}
Removes the current theme from DOM
- Source:
- <<<<<<< HEAD:docs/api/client/module-theme_Theme.html theme/Theme.js, line 100 ======= theme/Theme.js, line 99 >>>>>>> main:docs/public/api/client/module-theme_Theme.html
Returns:
- Type
- Promise.<*>
(async, inner) update(name) → {Promise.<*>}
Updates the current theme by given value, if supported (light, dark)
Parameters:
Name | Type | Description |
---|---|---|
name |
string |
- Source:
- <<<<<<< HEAD:docs/api/client/module-theme_Theme.html theme/Theme.js, line 89 ======= theme/Theme.js, line 88 >>>>>>> main:docs/public/api/client/module-theme_Theme.html
Returns:
- Type
- Promise.<*>