mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-20 07:41:22 +02:00
A bunch more theme stuff
This commit is contained in:
13
src-web/hooks/useThemes.ts
Normal file
13
src-web/hooks/useThemes.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { yaakDark, yaakLight, yaakThemes } from '../lib/theme/themes';
|
||||
|
||||
export function useThemes() {
|
||||
const dark = yaakDark;
|
||||
const light = yaakLight;
|
||||
|
||||
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 } };
|
||||
}
|
||||
Reference in New Issue
Block a user