Add method add variables in customization options

This commit is contained in:
Konstantinos Triantafyllou 2022-07-21 15:00:26 +03:00
parent 2c289af1e6
commit f9f8363d5c
1 changed files with 13 additions and 0 deletions

View File

@ -6,6 +6,19 @@ export class Layout {
this.portalPid = community;
this.layoutOptions = options;
}
public static getVariables(layout: Layout): {} | null {
let options = layout.layoutOptions;
if(options) {
let variables = {};
if(options.identity) {
variables['@global-primary-background'] = options.identity.mainColor;
variables['@global-secondary-background'] = options.identity.secondaryColor;
}
return variables;
}
return null;
}
}
export class CustomizationOptions {
identity: {