Co-authored-by: Rotimi Best <[email protected]> Merge-request: CLASSROOMIO-MR-8 Merged-by: Digdippa Team <[email protected]>
8 lines
227 B
JavaScript
8 lines
227 B
JavaScript
export function toggleBodyByTheme(isDark) {
|
|
if (isDark) {
|
|
document.body.className = document.body.className.concat(' ', 'dark');
|
|
} else {
|
|
document.body.className = document.body.className.replace('dark', '');
|
|
}
|
|
}
|