mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
wip darkmode
This commit is contained in:
@@ -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>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user