mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-07-19 05:09:37 +02:00
13 lines
327 B
TypeScript
13 lines
327 B
TypeScript
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']);
|
|
},
|
|
};
|
|
}
|