From f9f8363d5ccf0ef9494a3ce6a29034855f8fb500 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 21 Jul 2022 15:00:26 +0300 Subject: [PATCH] Add method add variables in customization options --- connect/community/CustomizationOptions.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/connect/community/CustomizationOptions.ts b/connect/community/CustomizationOptions.ts index 988c758f..9de9d949 100644 --- a/connect/community/CustomizationOptions.ts +++ b/connect/community/CustomizationOptions.ts @@ -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: {