strudel/website/src/useTheme.jsx
Felix Roos 014555fe5d add vim toggle to settings
+ added persistent global state store
+ refactored themes to use the new store
2023-02-19 01:51:31 +01:00

14 lines
315 B
JavaScript

import { settings } from './repl/themes.mjs';
import useStore from './useStore.mjs';
function useTheme() {
const { state } = useStore();
const theme = state.theme || 'strudelTheme';
const themeSettings = settings[theme];
return {
theme: state.theme,
themeSettings,
};
}
export default useTheme;