wip darkmode

This commit is contained in:
Ahmed Bouhuolia
2025-08-04 12:25:27 +02:00
parent 456a9e1ad9
commit d9a716a46f
170 changed files with 2006 additions and 1018 deletions

View File

@@ -9,6 +9,17 @@ import withUniversalSearchActions from '@/containers/UniversalSearch/withUnivers
import { compose } from '@/utils';
// Toggle dark/light mode by toggling 'bp4-dark' class on body
const handleToggleDarkMode = () => {
const body = document.body;
if (body.classList.contains('bp4-dark')) {
body.classList.remove('bp4-dark');
} else {
body.classList.add('bp4-dark');
}
};
function GlobalHotkeys({
// #withDashboardActions
toggleSidebarExpand,
@@ -55,6 +66,9 @@ function GlobalHotkeys({
openGlobalSearch();
}, 0);
});
useHotkeys('shift+h', () => {
handleToggleDarkMode();
});
return <div></div>;
}