Files
yaak-mountain-loop/src-web/hooks/useGenerateThemeCss.ts
Gregory Schier 36bbb87a5e Mostly working
2025-07-03 11:48:17 -07:00

13 lines
458 B
TypeScript

import { copyToClipboard } from '../lib/copy';
import { getThemes } from '../lib/theme/themes';
import { getThemeCSS } from '../lib/theme/window';
import { useListenToTauriEvent } from './useListenToTauriEvent';
export function useGenerateThemeCss() {
useListenToTauriEvent('generate_theme_css', async () => {
const themes = await getThemes();
const themesCss = themes.themes.map(getThemeCSS).join('\n\n');
copyToClipboard(themesCss);
});
}