1
0
Fork 0
mirror of https://github.com/CorentinTh/it-tools.git synced 2025-07-24 07:39:36 +02:00
it-tools/src/ui/theme/theme.models.ts

14 lines
327 B
TypeScript
Raw Normal View History

import { useStyleStore } from '@/stores/style.store';
export { defineThemes };
function defineThemes<Theme>(themes: { light: Theme; dark: Theme }) {
return {
themes,
useTheme() {
const styleStore = useStyleStore();
return computed(() => themes[styleStore.isDarkTheme ? 'dark' : 'light']);
},
};
}