sprint-asia-custom-component 0.1.90 → 0.1.92
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/index.js
CHANGED
|
@@ -28891,7 +28891,7 @@
|
|
|
28891
28891
|
as: "div",
|
|
28892
28892
|
className: "relative z-10",
|
|
28893
28893
|
initialFocus: cancelButtonRef,
|
|
28894
|
-
onClose: () => props.
|
|
28894
|
+
onClose: () => props.onClose(),
|
|
28895
28895
|
static: true
|
|
28896
28896
|
}, /*#__PURE__*/React__default["default"].createElement(qe.Child, {
|
|
28897
28897
|
as: React.Fragment,
|
package/package.json
CHANGED
|
@@ -1,62 +1,69 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Fragment, useRef} from
|
|
3
|
-
import { Dialog, Transition } from
|
|
4
|
-
import LogoSuccess from "../../../assets/images/logo_success.png"
|
|
5
|
-
import LogoFailed from "../../../assets/images/logo_failed.png"
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Fragment, useRef } from "react";
|
|
3
|
+
import { Dialog, Transition } from "@headlessui/react";
|
|
4
|
+
import LogoSuccess from "../../../assets/images/logo_success.png";
|
|
5
|
+
import LogoFailed from "../../../assets/images/logo_failed.png";
|
|
6
6
|
|
|
7
7
|
const ModalResult = (props) => {
|
|
8
|
-
const cancelButtonRef = useRef(null)
|
|
8
|
+
const cancelButtonRef = useRef(null);
|
|
9
9
|
|
|
10
10
|
function handleBackgroundClick(e) {
|
|
11
|
-
e.stopPropagation()
|
|
11
|
+
e.stopPropagation();
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
15
|
<Transition.Root show={props.isOpen} as={Fragment}>
|
|
16
|
-
|
|
16
|
+
<Dialog
|
|
17
|
+
as="div"
|
|
18
|
+
className="relative z-10"
|
|
19
|
+
initialFocus={cancelButtonRef}
|
|
20
|
+
onClose={() => props.onClose()}
|
|
21
|
+
static={true}
|
|
22
|
+
>
|
|
23
|
+
<Transition.Child
|
|
24
|
+
as={Fragment}
|
|
25
|
+
enter="ease-out duration-300"
|
|
26
|
+
enterFrom="opacity-0"
|
|
27
|
+
enterTo="opacity-100"
|
|
28
|
+
leave="ease-in duration-200"
|
|
29
|
+
leaveFrom="opacity-100"
|
|
30
|
+
leaveTo="opacity-0"
|
|
31
|
+
>
|
|
32
|
+
<div className="fixed inset-0 bg-black bg-opacity-25 transition-opacity" onClick={handleBackgroundClick} />
|
|
33
|
+
</Transition.Child>
|
|
34
|
+
|
|
35
|
+
<div className="fixed inset-0 z-10 w-screen overflow-y-auto">
|
|
36
|
+
<div className="flex min-h-full items-center justify-center p-4 text-center sm:items-center sm:p-0">
|
|
17
37
|
<Transition.Child
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
38
|
+
as={Fragment}
|
|
39
|
+
enter="ease-out duration-300"
|
|
40
|
+
enterFrom="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
41
|
+
enterTo="opacity-100 translate-y-0 sm:scale-100"
|
|
42
|
+
leave="ease-in duration-200"
|
|
43
|
+
leaveFrom="opacity-100 translate-y-0 sm:scale-100"
|
|
44
|
+
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
25
45
|
>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
>
|
|
40
|
-
<Dialog.Panel className="relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all w-80">
|
|
41
|
-
<div className="bg-white px-4 pb-4 pt-5 sm:p-4 text-center">
|
|
42
|
-
<div className='flex justify-center items-center my-3'>
|
|
43
|
-
{
|
|
44
|
-
props.type == "success" ?
|
|
45
|
-
<img src={LogoSuccess} className='w-14 h-14'/>
|
|
46
|
-
:
|
|
47
|
-
<img src={LogoFailed} className='w-14 h-14'/>
|
|
48
|
-
}
|
|
49
|
-
</div>
|
|
50
|
-
<p className='text-xl text-black font-semibold mt-2'>{props.type == "success" ? "Success" : "Failed"}</p>
|
|
51
|
-
<p className='text-sm text-black mb-2'>{props.subtitle}</p>
|
|
52
|
-
</div>
|
|
53
|
-
</Dialog.Panel>
|
|
54
|
-
</Transition.Child>
|
|
46
|
+
<Dialog.Panel className="relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all w-80">
|
|
47
|
+
<div className="bg-white px-4 pb-4 pt-5 sm:p-4 text-center">
|
|
48
|
+
<div className="flex justify-center items-center my-3">
|
|
49
|
+
{props.type == "success" ? (
|
|
50
|
+
<img src={LogoSuccess} className="w-14 h-14" />
|
|
51
|
+
) : (
|
|
52
|
+
<img src={LogoFailed} className="w-14 h-14" />
|
|
53
|
+
)}
|
|
54
|
+
</div>
|
|
55
|
+
<p className="text-xl text-black font-semibold mt-2">
|
|
56
|
+
{props.type == "success" ? "Success" : "Failed"}
|
|
57
|
+
</p>
|
|
58
|
+
<p className="text-sm text-black mb-2">{props.subtitle}</p>
|
|
55
59
|
</div>
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
</Dialog.Panel>
|
|
61
|
+
</Transition.Child>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</Dialog>
|
|
58
65
|
</Transition.Root>
|
|
59
|
-
)
|
|
60
|
-
}
|
|
66
|
+
);
|
|
67
|
+
};
|
|
61
68
|
|
|
62
|
-
export default ModalResult
|
|
69
|
+
export default ModalResult;
|