feat: first commit
This commit is contained in:
9
admin/src/utils/changeTheme.ts
Normal file
9
admin/src/utils/changeTheme.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
function changeTheme(theme) {
|
||||
if (theme === 'dark') {
|
||||
document.body.setAttribute('arco-theme', 'dark');
|
||||
} else {
|
||||
document.body.removeAttribute('arco-theme');
|
||||
}
|
||||
}
|
||||
|
||||
export default changeTheme;
|
||||
Reference in New Issue
Block a user