Created convention file for frontend and adjusted current project files (#277)
Reviewed-on: #277 Reviewed-by: Mikolaj Widla <widlam@noreply.example.com> Co-authored-by: Adam Bem <adam.bem@zoho.eu> Co-committed-by: Adam Bem <adam.bem@zoho.eu>
This commit is contained in:
@@ -1,30 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import lightThemeIcon from '@/assets/light_theme.svg';
|
||||
import darkThemeIcon from '@/assets/dark_theme.svg';
|
||||
const emit = defineEmits([
|
||||
"theme",
|
||||
]);
|
||||
|
||||
const emit = defineEmits([
|
||||
"theme",
|
||||
]);
|
||||
function toDarkMode(){
|
||||
localStorage.theme = "dark";
|
||||
document.documentElement.classList.add('dark');
|
||||
emit('theme',"dark");
|
||||
|
||||
}
|
||||
|
||||
function toDarkMode(){
|
||||
localStorage.theme = "dark";
|
||||
document.documentElement.classList.add('dark');
|
||||
emit('theme',"dark");
|
||||
|
||||
}
|
||||
|
||||
function toLightMode(){
|
||||
localStorage.theme = "light";
|
||||
document.documentElement.classList.remove('dark');
|
||||
emit('theme',"light");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function toLightMode(){
|
||||
localStorage.theme = "light";
|
||||
document.documentElement.classList.remove('dark');
|
||||
emit('theme',"light");
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user