From a56094213d5eff221d316fc526cd77c0e8683bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Str=C3=B6mberg?= Date: Thu, 21 Nov 2024 15:48:41 +0100 Subject: [PATCH] Use theme to define color on links in Document Handler --- .../utils/ContentComponentFactory.js | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/apps/client/src/plugins/DocumentHandler/utils/ContentComponentFactory.js b/apps/client/src/plugins/DocumentHandler/utils/ContentComponentFactory.js index bcd8655c1..5525e9a7e 100644 --- a/apps/client/src/plugins/DocumentHandler/utils/ContentComponentFactory.js +++ b/apps/client/src/plugins/DocumentHandler/utils/ContentComponentFactory.js @@ -754,7 +754,10 @@ export const CustomLink = ({ aTag, localObserver, bottomMargin }) => { ); }; - const getExternalLink = (externalLink) => { + const GetExternalLink = (externalLink) => { + // Grab the theme to determine current light/dark mode + const theme = useTheme(); + return (