From 1fb189cae98cc3537f520e2f3a6d4398b6ffebdd Mon Sep 17 00:00:00 2001 From: Peter Zimon Date: Fri, 8 Jul 2022 10:44:12 +0200 Subject: [PATCH] Added accent color --- apps/comments-ui/src/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/comments-ui/src/index.js b/apps/comments-ui/src/index.js index 9a97f8875c..c2e109a682 100644 --- a/apps/comments-ui/src/index.js +++ b/apps/comments-ui/src/index.js @@ -36,8 +36,9 @@ function getSiteData() { const postId = scriptTag.dataset.postId; const colorScheme = scriptTag.dataset.colorScheme; const avatarSaturation = scriptTag.dataset.avatarSaturation; + const accentColor = scriptTag.dataset.accentColor; - return {siteUrl, apiKey, apiUrl, sentryDsn, postId, adminUrl, colorScheme, avatarSaturation}; + return {siteUrl, apiKey, apiUrl, sentryDsn, postId, adminUrl, colorScheme, avatarSaturation, accentColor}; } return {}; } @@ -57,13 +58,13 @@ function setup({siteUrl}) { function init() { // const customSiteUrl = getSiteUrl(); - const {siteUrl: customSiteUrl, sentryDsn, postId, adminUrl, colorScheme, avatarSaturation} = getSiteData(); + const {siteUrl: customSiteUrl, sentryDsn, postId, adminUrl, colorScheme, avatarSaturation, accentColor} = getSiteData(); const siteUrl = customSiteUrl || window.location.origin; setup({siteUrl}); ReactDOM.render( - {} + {} , document.getElementById(ROOT_DIV_ID) );