add emacs mode + fontSize slider

This commit is contained in:
Felix Roos 2023-02-19 13:49:55 +01:00
parent 014555fe5d
commit ceb3aa0627
7 changed files with 143 additions and 34 deletions

View file

@ -1,7 +1,15 @@
export const storeKey = 'strudel-settings';
const defaults = {
keybindings: 'codemirror',
theme: 'strudelTheme',
fontSize: 18,
};
export function get(prop) {
const state = JSON.parse(localStorage.getItem(storeKey));
let state = {
...defaults,
...JSON.parse(localStorage.getItem(storeKey) || '{}'),
};
if (!prop) {
return state;
}