mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-16 16:46:38 +01:00
14 lines
428 B
TypeScript
14 lines
428 B
TypeScript
import { defaultDarkTheme, defaultLightTheme, yaakThemes } from '../lib/theme/themes';
|
|
|
|
export function useThemes() {
|
|
const dark = defaultDarkTheme;
|
|
const light = defaultLightTheme;
|
|
|
|
const otherThemes = yaakThemes
|
|
.filter((t) => t.id !== dark.id && t.id !== light.id)
|
|
.sort((a, b) => a.name.localeCompare(b.name));
|
|
|
|
const themes = [dark, light, ...otherThemes];
|
|
return { themes, fallback: { dark, light } };
|
|
}
|