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.

19 lines
369 B

4 years ago
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. console.log("Opening modal", name, data)
  8. set({name, data});
  9. },
  10. close() {
  11. set({name: null, data: null})
  12. },
  13. }
  14. }
  15. export default createModalStore();