mirror of
https://github.com/Art051/it-tools.git
synced 2025-08-11 19:29:03 +00: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]);
|
|
},
|
|
};
|
|
}
|