mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-11-16 10:38:38 +05:30
13 lines
340 B
TypeScript
13 lines
340 B
TypeScript
import { useStorage, usePreferredDark } from '@vueuse/core';
|
|
import { defineStore } from 'pinia';
|
|
import type { Ref } from 'vue';
|
|
|
|
export const useStyleStore = defineStore('style', {
|
|
state: () => {
|
|
const isDark = usePreferredDark();
|
|
|
|
return {
|
|
isDarkTheme: useStorage('useDarkTheme', isDark) as Ref<boolean>,
|
|
};
|
|
},
|
|
});
|