@lerx/promise-modal 0.8.7 → 0.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/useModalDuration.d.ts +2 -2
- package/dist/index.cjs +7 -4
- package/dist/index.mjs +7 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1058,15 +1058,18 @@ const useModalAnimation = (visible, handler) => {
|
|
|
1058
1058
|
}, [visible]);
|
|
1059
1059
|
};
|
|
1060
1060
|
|
|
1061
|
-
const useModalDuration = (
|
|
1061
|
+
const useModalDuration = (modalId) => {
|
|
1062
1062
|
const globalDuration = useConfigurationDuration();
|
|
1063
|
-
if (
|
|
1063
|
+
if (modalId === undefined)
|
|
1064
1064
|
return globalDuration;
|
|
1065
|
-
const { modal } = useModalManager(
|
|
1065
|
+
const { modal } = useModalManager(modalId);
|
|
1066
1066
|
if (modal === undefined)
|
|
1067
1067
|
return globalDuration;
|
|
1068
1068
|
const milliseconds = modal.duration;
|
|
1069
|
-
return {
|
|
1069
|
+
return {
|
|
1070
|
+
duration: (milliseconds + 'ms'),
|
|
1071
|
+
milliseconds,
|
|
1072
|
+
};
|
|
1070
1073
|
};
|
|
1071
1074
|
|
|
1072
1075
|
exports.ModalProvider = BootstrapProvider;
|
package/dist/index.mjs
CHANGED
|
@@ -1056,15 +1056,18 @@ const useModalAnimation = (visible, handler) => {
|
|
|
1056
1056
|
}, [visible]);
|
|
1057
1057
|
};
|
|
1058
1058
|
|
|
1059
|
-
const useModalDuration = (
|
|
1059
|
+
const useModalDuration = (modalId) => {
|
|
1060
1060
|
const globalDuration = useConfigurationDuration();
|
|
1061
|
-
if (
|
|
1061
|
+
if (modalId === undefined)
|
|
1062
1062
|
return globalDuration;
|
|
1063
|
-
const { modal } = useModalManager(
|
|
1063
|
+
const { modal } = useModalManager(modalId);
|
|
1064
1064
|
if (modal === undefined)
|
|
1065
1065
|
return globalDuration;
|
|
1066
1066
|
const milliseconds = modal.duration;
|
|
1067
|
-
return {
|
|
1067
|
+
return {
|
|
1068
|
+
duration: (milliseconds + 'ms'),
|
|
1069
|
+
milliseconds,
|
|
1070
|
+
};
|
|
1068
1071
|
};
|
|
1069
1072
|
|
|
1070
1073
|
export { BootstrapProvider as ModalProvider, alert, confirm, prompt, useActiveModalCount, useDestroyAfter, useBootstrap as useInitializeModal, useModal, useModalAnimation, useConfigurationBackdrop as useModalBackdrop, useModalDuration, useConfigurationOptions as useModalOptions, useSubscribeModal };
|
package/package.json
CHANGED