Spaces:
Running
Running
import { writable } from "svelte/store"; | |
import type Row from "./Row"; | |
export const editingRow = writable<Row | null>(null); | |
export const statusMessage = createStatusStore(); | |
function createStatusStore() { | |
const { subscribe, set, update } = writable(""); | |
return { | |
subscribe, | |
set, | |
append: (value: string) => update((n) => n + value), | |
remove: (value: string) => update((n) => n.split(value)[0]), | |
reset: () => set(""), | |
}; | |
} | |