CLASSROOMIO-T-41: Implement dark/light mode switch

Co-authored-by: Rotimi Best <[email protected]>

Merge-request: CLASSROOMIO-MR-8
Merged-by: Digdippa Team <[email protected]>
This commit is contained in:
Rotimi Best
2023-05-05 20:19:45 +00:00
committed by Space Cloud
co-authored by Rotimi Best
parent 5f14b36ef8
commit 1388a41097
95 changed files with 611 additions and 425 deletions
+7
View File
@@ -0,0 +1,7 @@
export function toggleBodyByTheme(isDark) {
if (isDark) {
document.body.className = document.body.className.concat(' ', 'dark');
} else {
document.body.className = document.body.className.replace('dark', '');
}
}
+5
View File
@@ -0,0 +1,5 @@
import { writable } from 'svelte/store';
export const appStore = writable({
isDark: false,
});