connection modal

This commit is contained in:
Jan Prochazka
2021-03-04 10:04:34 +01:00
parent a0aa508e8d
commit 593e61abb9
14 changed files with 213 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
import { openedModals } from '../stores';
import uuidv1 from 'uuid/v1';
export function showModal(component, props = {}) {
const modalId = uuidv1();
openedModals.update(x => [...x, { component, modalId, props }]);
}
export function closeModal(modalId) {
openedModals.update(x => x.filter(y => y.modalId != modalId));
}