SiThemeStore Type documentation¶
TypeScript declaration¶
SiThemeStore object is used by the theme service to load and store the themes. You can inject your own implementation to provide a backend implementation. Otherwise a localStorage based implementation is used. activateTheme Sets the theme with the given name to active. Returns: True on success, otherwise false. deactivateTheme Deactivate any active theme and makes the element theme the default one. Returns: True on success, otherwise false. deleteTheme Deletes the theme with the given name from the store. Returns: True on success, otherwise false. All nicely wrapped in an observable that may also emit errors. Returns false, if the theme does not exist. loadActiveTheme Load and return an alternative custom theme, other then the default element theme. This method is invoked initially to check for an alternative custom theme. Returns: The active theme to be used, or undefined if the default element theme shall be used. All wrapped in an observable that can also emit errors. loadTheme Load theme with the given Returns: Observable with the named theme or loadThemeNames Load and return the available theme names. Returns: An saveTheme Saves a theme to the store. The name shall not be empty. A theme with identical name gets overwritten. Returns: True on success, otherwise false. All nicely wrapped in an observable that may also emit errors.import { SiThemeStore } from '@siemens/element-ng/theme';
() => SiThemeStore ¶
(name: string) => Observable<boolean> ¶ () => Observable<boolean> ¶ (name: string) => Observable<boolean> ¶ () => Observable<Theme | undefined> ¶ (name: string) => Observable<Theme | undefined> ¶ name.undefined if no such theme exist.() => Observable<string[]> ¶ Observable of available theme names, other than the default element theme.(theme: Theme) => Observable<boolean> ¶
Types Documentation¶
A map of icons that overrides the default Element icons. The key must be the key of the original icon that should be overridden. The value has to be a data SVG string. Example:import type { Theme } from '@siemens/element-ng/theme';
{
elementUser: "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'>...</svg>"
}
dark ? : light ? : import type { ThemeColorSchemes } from '@siemens/element-ng/theme';
ThemeColorScheme ¶ ThemeColorScheme ¶
import type { ThemeColorScheme } from '@siemens/element-ng/theme';
Except where otherwise noted, content on this site is licensed under MIT License.