mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-02-23 02:54:58 +01:00
13 lines
458 B
TypeScript
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);
|
|
});
|
|
}
|