зеркало из https://github.com/Azure/BatchExplorer.git
796 B
796 B
BatchExplorer prebuilt themes
- classic: default theme. All other themes will inherit from this one
Adding attributes to the theme
-
Add the attribute to the
classic.json
theme -
Update the
theme.schema.json
to allow color higlighting and autocomplete -
Update the
theme-definition.model.ts
-
Define the attribute(s) in the
theme.model.ts
-
Optional: Set scss varialbes in
theme/core.scss
to be alias of css vars for you new attributes
Use theme colors in javascript
import { ThemeService, Theme } from "app/services";
constructor(themeService: ThemeService) {
// Don't forget to unsubscribe this sub in ngOnDestroy
this._sub = themeService.currentTheme.subscribe((theme: Theme) => {
// Access colors
theme.mainBackground;
});
}