Add method add variables in customization options
This commit is contained in:
parent
2c289af1e6
commit
f9f8363d5c
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue