You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

21 lines
465 B

export default {
mounted() {
this.update();
},
updated() {
this.update();
},
methods: {
update() {
Quasar.Dark.set(this.value === null ? "auto" : this.value);
if (window.tailwind) {
tailwind.config.darkMode = this.value === null ? "media" : "class";
if (this.value) document.body.classList.add("dark");
else document.body.classList.remove("dark");
}
},
},
props: {
value: Boolean,
},
};