From b80626f5e2d349ab8fdbb32fad5a6f59809246cb Mon Sep 17 00:00:00 2001 From: Shaheer Kochai Date: Tue, 6 May 2025 20:14:26 +0430 Subject: [PATCH] fix: add dark class to the elements when dark mode is enabled to support components library modes (#7607) --- frontend/src/container/AppLayout/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/container/AppLayout/index.tsx b/frontend/src/container/AppLayout/index.tsx index 2cff413199..591a3481d9 100644 --- a/frontend/src/container/AppLayout/index.tsx +++ b/frontend/src/container/AppLayout/index.tsx @@ -376,9 +376,11 @@ function AppLayout(props: AppLayoutProps): JSX.Element { useEffect(() => { if (isDarkMode) { document.body.classList.remove('lightMode'); + document.body.classList.add('dark'); document.body.classList.add('darkMode'); } else { document.body.classList.add('lightMode'); + document.body.classList.remove('dark'); document.body.classList.remove('darkMode'); } }, [isDarkMode]); @@ -588,7 +590,7 @@ function AppLayout(props: AppLayoutProps): JSX.Element { ); return ( - + {pageTitle} @@ -638,7 +640,9 @@ function AppLayout(props: AppLayoutProps): JSX.Element { )} - + {isToDisplayLayout && !renderFullScreen && }