Plan stuff. Log stuff.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
322 B

4 years ago
  1. import { writable } from "svelte/store";
  2. function createModalStore() {
  3. const {set, subscribe} = writable({name: null, data: null});
  4. return {
  5. subscribe,
  6. open(name, data = {}) {
  7. set({name, data});
  8. },
  9. close() {
  10. set({name: null, data: null})
  11. },
  12. }
  13. }
  14. export default createModalStore();