fix dark mode in item row and switch issue

This commit is contained in:
yashkanakiya
2023-03-31 17:13:40 +05:30
parent de235a91e5
commit eda4e89796
7 changed files with 97 additions and 58 deletions

View File

@ -24,14 +24,6 @@ import { useGlobalStore } from '@/scripts/customer/stores/global'
const globalStore = useGlobalStore()
const enabled = computed(
()=>
localStorage.getItem('theme') === 'dark' ||
document.documentElement.classList.contains('dark')
)
globalStore.isDarkModeOn = enabled.value
function onChange() {
globalStore.isDarkModeOn = !globalStore.isDarkModeOn
@ -43,7 +35,6 @@ function onChange() {
localStorage.theme = 'light'
document.documentElement.classList.remove('dark')
document.documentElement.style.setProperty('color-scheme', 'light')
}
}
</script>