JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "theme-selector-context.ts"

Full Path: /home/markqprx/iniasli.pro/client/ui/themes/theme-selector-context.ts
File size: 453 bytes
MIME-type: text/plain
Charset: utf-8

import {createContext, useContext} from 'react';
import {CssTheme} from './css-theme';

export type ThemeId = 'light' | 'dark' | number;

export interface ThemeSelectorContextValue {
  allThemes: CssTheme[];
  selectedTheme: CssTheme;
  selectTheme: (themeId: ThemeId) => void;
}

export const ThemeSelectorContext = createContext<ThemeSelectorContextValue>(
  null!
);

export function useThemeSelector() {
  return useContext(ThemeSelectorContext);
}