CLASSROOMIO-T-41: Implement dark/light mode switch
Co-authored-by: Rotimi Best <rotimiibitoyeemma@gmail.com> Merge-request: CLASSROOMIO-MR-8 Merged-by: Digdippa Team <digdippa@gmail.com>
This commit is contained in:
committed by
Space Cloud
co-authored by
Rotimi Best
parent
5f14b36ef8
commit
1388a41097
@@ -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', '');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
export const appStore = writable({
|
||||
isDark: false,
|
||||
});
|
||||
Reference in New Issue
Block a user