portfolio/stores/ModalStore.js

19 lines
793 B
JavaScript
Raw Normal View History

import {defineStore} from "pinia";
export const useModalStore = defineStore("ModalStore", {
state: () => ({"type": "", "aspect":"", "isOpen":false, "bucket":"", "gallery":"", "vimeo_trackid": "", "pdfUrl": "", "soundcloudUrl": "", "iframeUrl": "", "initialIndex": 0}),
actions: {
setModalProps(type, aspect, isOpen, bucket, gallery, vimeo_trackid, pdfUrl, soundcloudUrl, iframeUrl, initialIndex = 0) {
this.type = type
this.aspect = aspect
this.isOpen = isOpen
this.bucket = bucket
this.gallery = gallery
this.vimeo_trackid = vimeo_trackid
this.pdfUrl = pdfUrl
this.soundcloudUrl = soundcloudUrl
this.iframeUrl = iframeUrl
this.initialIndex = initialIndex
}
}
})