add emacs mode + fontSize slider
This commit is contained in:
parent
014555fe5d
commit
ceb3aa0627
7 changed files with 143 additions and 34 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue