mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-08-02 03:55:17 +02:00
14 lines
299 B
TypeScript
14 lines
299 B
TypeScript
|
import { useThemeStore } from './theme.store';
|
||
|
|
||
|
export { defineThemes };
|
||
|
|
||
|
function defineThemes<Theme>(themes: { light: Theme; dark: Theme }) {
|
||
|
return {
|
||
|
themes,
|
||
|
useTheme() {
|
||
|
const themeStore = useThemeStore();
|
||
|
return computed(() => themes[themeStore.themeType]);
|
||
|
},
|
||
|
};
|
||
|
}
|