mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-11-07 20:47:25 +01:00
initial public commit
This commit is contained in:
commit
3d07f0211d
484 files changed
+92412
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { writable } from "svelte/store";
|
||||
|
||||
// eg.
|
||||
// {
|
||||
// "text": "Do you really want to delete the selectedItem",
|
||||
// "yesCallback": function() {...},
|
||||
// "noCallback": function() {...},
|
||||
// }
|
||||
export const confirmation = writable({});
|
||||
|
||||
/**
|
||||
* @param {String} text
|
||||
* @param {Function} [yesCallback]
|
||||
* @param {Function} [noCallback]
|
||||
*/
|
||||
export function confirm(text, yesCallback, noCallback) {
|
||||
confirmation.set({
|
||||
text: text,
|
||||
yesCallback: yesCallback,
|
||||
noCallback: noCallback,
|
||||
});
|
||||
}
|
||||
|
||||
export function resetConfirmation() {
|
||||
confirmation.set({});
|
||||
}
|
||||
Reference in new issue
Block a user