You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think adding a close handler to openModal fn could make the componet very flexible.
Imagine a scenario like this:
constconfirmModal=({question})=>newPromise(resolve=>openModal(ConfirmModal,onConfirm: ()=>resolve(true),{onClose: ()=>resolve(false)}));constisConfirmed=awaitconfirmModal({question: "Are you sure?"});
OFC I can add an event handler to Cancel button or corner X button, but what about closing stuff programmatically from another place (eg. by clicking backdrop)?
The text was updated successfully, but these errors were encountered:
I think adding a close handler to
openModal
fn could make the componet very flexible.Imagine a scenario like this:
OFC I can add an event handler to
Cancel
button or cornerX
button, but what about closing stuff programmatically from another place (eg. by clicking backdrop)?The text was updated successfully, but these errors were encountered: