Files
psysonic/src/store/fontStore.ts
T
2026-04-18 02:16:57 +04:00

24 lines
675 B
TypeScript

import { create } from 'zustand';
import { persist } from 'zustand/middleware';
export type FontId = 'inter' | 'outfit' | 'dm-sans' | 'nunito' | 'rubik' | 'space-grotesk' | 'figtree' | 'manrope' | 'plus-jakarta-sans' | 'lexend' | 'geist' | 'jetbrains-mono' | 'golos-text' | 'unbounded';
interface FontState {
font: FontId;
setFont: (font: FontId) => void;
uiScale: number;
setUiScale: (scale: number) => void;
}
export const useFontStore = create<FontState>()(
persist(
(set) => ({
font: 'lexend',
setFont: (font) => set({ font }),
uiScale: 1.0,
setUiScale: (uiScale) => set({ uiScale }),
}),
{ name: 'psysonic_font' }
)
);