nestiq-component-library 1.0.36 → 1.0.37
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/assets/images/close.b5ce9141e80c688b.png +0 -0
- package/dist/assets/images/icon_close_2.png +0 -0
- package/dist/components/Button/Button.js +6 -0
- package/dist/components/ImageListPopup/ImageListPopup.d.ts +0 -1
- package/dist/components/ImageListPopup/ImageListPopup.js +26 -0
- package/dist/components/Popup/Popup.d.ts +0 -1
- package/dist/components/Popup/Popup.js +12 -0
- package/dist/components/PropertyCard/PropertyCard.d.ts +6 -0
- package/dist/components/SharePopup/PopUp.d.ts +7 -0
- package/dist/index.d.ts +0 -3
- package/dist/index.es.js +18 -25
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +17 -27
- package/dist/index.js.map +1 -1
- package/package.json +1 -4
- package/rollup.config.mjs +35 -35
- package/src/assets/images/close.png +0 -0
- package/src/assets/images/close_white.png +0 -0
- package/src/assets/images/icon_close 2.png +0 -0
- package/src/assets/images/icon_share 1.svg +3 -0
- package/src/components/ImageListPopup/ImageListPopup.css +107 -83
- package/src/components/ImageListPopup/ImageListPopup.tsx +140 -142
- package/src/components/Popup/Popup.css +13 -0
- package/src/components/Popup/Popup.tsx +28 -29
- package/src/components/PropertyCard/PropertyCard.tsx +8 -1
- package/src/components/PropertyDetailsHeader/PropertyDetailsHeader.tsx +84 -80
- package/src/components/SharePopup/{SharePopup.css → PopUp.css} +14 -0
- package/src/components/SharePopup/{SharePopup.tsx → PopUp.tsx} +140 -139
- package/src/index.tsx +7 -13
- package/dist/components/SharePopup/SharePopup.d.ts +0 -4
- package/dist/components/ToastWrapper/ToastWrapper.d.ts +0 -4
- package/src/assets/images/Images/envelope-fill.svg +0 -3
- package/src/assets/images/Images/facebook.svg +0 -3
- package/src/assets/images/Images/linkedin.svg +0 -3
- package/src/assets/images/Images/twitter-x.svg +0 -3
- package/src/assets/images/Images/whatsapp.svg +0 -3
- package/src/components/ToastWrapper/ToastWrapper.tsx +0 -25
- package/src/styles/common.css +0 -12
- /package/{src/assets/images/Images → dist/assets/images}/Icon_rightArrow.svg +0 -0
- /package/{src/assets/images/Images → dist/assets/images}/LayersIcon.svg +0 -0
- /package/{src/assets/images/Images → dist/assets/images}/blackarrow-Right.svg +0 -0
- /package/{src/assets/images/Images → dist/assets/images}/blckarrow-Left.svg +0 -0
- /package/{src/assets/images/Images → dist/assets/images}/chevron-left.svg +0 -0
- /package/{src/assets/images/Images → dist/assets/images}/default-property.jpg +0 -0
- /package/{src/assets/images/Images → dist/assets/images}/heartIcon.svg +0 -0
- /package/{src/assets/images/Images → dist/assets/images}/icon-close-white.webp +0 -0
- /package/{src/assets/images/Images/icon_close 2.png → dist/assets/images/icon_close 2.e41bb9a4db48e048.png} +0 -0
- /package/{src/assets/images/Images → dist/assets/images}/icon_gallery.svg +0 -0
- /package/{src/assets/images/Images → dist/assets/images}/icon_map.svg +0 -0
- /package/{src/assets/images/Images/icon_share 1.svg → dist/assets/images/icon_share_1.svg} +0 -0
- /package/{src/assets/images/Images → dist/assets/images}/layer_icon.svg +0 -0
- /package/{src/assets/images/Images → dist/assets/images}/locationIcon.svg +0 -0
- /package/{src/assets/images/Images → dist/assets/images}/locationIconBlack.svg +0 -0
- /package/{src/assets/images/Images → dist/assets/images}/no-image-icon.png +0 -0
- /package/src/assets/images/{Images/Logo-Nestiq_black.svg → Logo-Nestiq_black.svg} +0 -0
- /package/src/assets/images/{Images/arrow-right-short.svg → arrow-right-short.svg} +0 -0
- /package/src/assets/images/{Images/arrow-right.svg → arrow-right.svg} +0 -0
- /package/src/assets/images/{Images/dropdownIcon.svg → dropdownIcon.svg} +0 -0
- /package/src/assets/images/{Images/facebook_icon.svg → facebook_icon.svg} +0 -0
- /package/src/assets/images/{Images/google_icon.svg → google_icon.svg} +0 -0
- /package/src/assets/images/{Images/heart.svg → heart.svg} +0 -0
- /package/src/assets/images/{Images/house.jpg → house.jpg} +0 -0
- /package/src/assets/images/{Images/icon_checkmark.svg → icon_checkmark.svg} +0 -0
- /package/src/assets/images/{Images/icon_home.svg → icon_home.svg} +0 -0
- /package/src/assets/images/{Images/icon_user.png → icon_user.png} +0 -0
- /package/src/assets/images/{Images/left arrow.svg → left arrow.svg} +0 -0
- /package/src/assets/images/{Images/left-arrow.svg → left-arrow.svg} +0 -0
- /package/src/assets/images/{Images/mail-icon.png → mail-icon.png} +0 -0
- /package/src/assets/images/{Images/right arrow.svg → right arrow.svg} +0 -0
- /package/src/assets/images/{Images/right-arrow.svg → right-arrow.svg} +0 -0
- /package/src/assets/images/{Images/warning.svg → warning.svg} +0 -0
- /package/src/assets/images/{Images/x.svg → x.svg} +0 -0
|
@@ -1,83 +1,107 @@
|
|
|
1
|
-
.popup-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
background: none;
|
|
46
|
-
border: none;
|
|
47
|
-
color: white;
|
|
48
|
-
font-size:
|
|
49
|
-
cursor: pointer;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
1
|
+
.popup-overlay {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
background-color: rgba(0, 0, 0, 0.7);
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
z-index: 10000;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.popup-container {
|
|
15
|
+
background-color: transparent;
|
|
16
|
+
border-radius: 8px;
|
|
17
|
+
max-width: 90%;
|
|
18
|
+
max-height: 90%;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
position: relative;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.popup-header {
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
align-items: center;
|
|
29
|
+
width: 100%;
|
|
30
|
+
padding: 1rem;
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.popup-title {
|
|
36
|
+
color: white;
|
|
37
|
+
font-size: 24px;
|
|
38
|
+
font-weight: bold;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.btn-close {
|
|
42
|
+
position: absolute;
|
|
43
|
+
right: 1rem;
|
|
44
|
+
top: 1rem;
|
|
45
|
+
background: none;
|
|
46
|
+
border: none;
|
|
47
|
+
color: white;
|
|
48
|
+
font-size: 24px;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.popup-body {
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
align-items: center;
|
|
56
|
+
padding: 1rem;
|
|
57
|
+
position: relative;
|
|
58
|
+
flex: 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.main-image {
|
|
62
|
+
max-width: 100%;
|
|
63
|
+
max-height: 80vh;
|
|
64
|
+
border-radius: 8px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.btn-prev,
|
|
68
|
+
.btn-next {
|
|
69
|
+
background: none;
|
|
70
|
+
border: none;
|
|
71
|
+
color: white;
|
|
72
|
+
font-size: 48px;
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 50%;
|
|
76
|
+
transform: translateY(-50%);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.btn-prev {
|
|
80
|
+
left: 10px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.btn-next {
|
|
84
|
+
right: 10px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.popup-thumbnails {
|
|
88
|
+
display: flex;
|
|
89
|
+
justify-content: center;
|
|
90
|
+
align-items: center;
|
|
91
|
+
gap: 10px;
|
|
92
|
+
padding: 1rem;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.thumbnail {
|
|
96
|
+
width: 60px;
|
|
97
|
+
height: 60px;
|
|
98
|
+
object-fit: cover;
|
|
99
|
+
border-radius: 8px;
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
opacity: 0.6;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.thumbnail.active {
|
|
105
|
+
border: 2px solid white;
|
|
106
|
+
opacity: 1;
|
|
107
|
+
}
|
|
@@ -1,142 +1,140 @@
|
|
|
1
|
-
import "./ImageListPopup.css";
|
|
2
|
-
import React, { useRef, useState } from "react";
|
|
3
|
-
import blcIconArrowRight from "../../assets/Images/blackarrow-Right.svg";
|
|
4
|
-
import blcIconArrowLeft from "../../assets/Images/blckarrow-Left.svg";
|
|
5
|
-
import iconClose from "../../assets/images/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const [
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
);
|
|
142
|
-
}
|
|
1
|
+
import "./ImageListPopup.css";
|
|
2
|
+
import React, { useRef, useState } from "react";
|
|
3
|
+
import blcIconArrowRight from "../../assets/Images/blackarrow-Right.svg";
|
|
4
|
+
import blcIconArrowLeft from "../../assets/Images/blckarrow-Left.svg";
|
|
5
|
+
import iconClose from "../../assets/images/close.png";
|
|
6
|
+
|
|
7
|
+
interface PopupProps {
|
|
8
|
+
pictureUrls: { title: string; url: string }[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function ImageListPopup(props: PopupProps) {
|
|
12
|
+
const [showPopUp, setShowPopUp] = useState(true);
|
|
13
|
+
const [currentImageIndex, setCurrentImageIndex] = useState(0);
|
|
14
|
+
const imageListRef = useRef<HTMLDivElement | null>(null);
|
|
15
|
+
|
|
16
|
+
const handleArrowClickInMainImage = (direction: any) => {
|
|
17
|
+
if (props.pictureUrls.length === 0) return;
|
|
18
|
+
|
|
19
|
+
let newIndex = currentImageIndex;
|
|
20
|
+
if (direction === "left") {
|
|
21
|
+
newIndex =
|
|
22
|
+
(currentImageIndex - 1 + props.pictureUrls.length) %
|
|
23
|
+
props.pictureUrls.length;
|
|
24
|
+
} else if (direction === "right") {
|
|
25
|
+
newIndex = (currentImageIndex + 1) % props.pictureUrls.length;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
setCurrentImageIndex(newIndex);
|
|
29
|
+
|
|
30
|
+
imageListRef.current!.scrollTo({
|
|
31
|
+
left: newIndex * 150,
|
|
32
|
+
behavior: "smooth",
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const handleClose = () => {
|
|
37
|
+
setShowPopUp(false);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<div>
|
|
42
|
+
{showPopUp && (
|
|
43
|
+
<div className="popup-overlay">
|
|
44
|
+
<div className=" d-flex w-50 flex-column col-6 ">
|
|
45
|
+
<div className="d-flex align-self-end me-5 mt-5">
|
|
46
|
+
<img
|
|
47
|
+
src={iconClose}
|
|
48
|
+
alt="close"
|
|
49
|
+
className="closeIcon mt-5"
|
|
50
|
+
onClick={handleClose}
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
<span className="text-white align-self-center">
|
|
54
|
+
{props.pictureUrls[currentImageIndex].title}
|
|
55
|
+
</span>
|
|
56
|
+
<div className="d-flex justify-content-center">
|
|
57
|
+
<div className="p-2 bd-highlight align-self-center align-items-center me-5">
|
|
58
|
+
<div
|
|
59
|
+
className="rounded-circle border onImageArrow start-0 d-flex "
|
|
60
|
+
role="button"
|
|
61
|
+
onClick={() => handleArrowClickInMainImage("left")}
|
|
62
|
+
>
|
|
63
|
+
<img
|
|
64
|
+
src={blcIconArrowLeft}
|
|
65
|
+
className="blackArrow align-self-center"
|
|
66
|
+
alt="Left Arrow"
|
|
67
|
+
/>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
<div className="p-2 bd-highlight">
|
|
71
|
+
<div
|
|
72
|
+
className=" rounded-5 mainImage "
|
|
73
|
+
style={{
|
|
74
|
+
backgroundImage: `url(${props.pictureUrls[currentImageIndex].url})`,
|
|
75
|
+
height: "350px",
|
|
76
|
+
width: "600px",
|
|
77
|
+
backgroundSize: "cover",
|
|
78
|
+
backgroundPosition: "center",
|
|
79
|
+
}}
|
|
80
|
+
></div>
|
|
81
|
+
</div>
|
|
82
|
+
<div className="p-2 bd-highlight align-self-center ms-5">
|
|
83
|
+
{" "}
|
|
84
|
+
<div
|
|
85
|
+
role="button"
|
|
86
|
+
className="rounded-circle border onImageArrow d-flex justify-content-center"
|
|
87
|
+
onClick={() => handleArrowClickInMainImage("right")}
|
|
88
|
+
>
|
|
89
|
+
<img
|
|
90
|
+
src={blcIconArrowRight}
|
|
91
|
+
className="blackArrow align-self-center"
|
|
92
|
+
alt="Right Arrow"
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
<div className="d-flex flex-row">
|
|
98
|
+
{/* Arrows on the main image */}
|
|
99
|
+
</div>
|
|
100
|
+
<div className="d-flex flex-row gap-4 w-100 secondList ">
|
|
101
|
+
<div className="col-lg-12 d-flex flex-row p-1 align-self-center mt-5">
|
|
102
|
+
<div className="col-12 position-relative d-flex justify-content-center">
|
|
103
|
+
<div
|
|
104
|
+
className="col-lg-10 rounded-3 h-100 w-100 d-flex flex-row gap-2 overflow-auto "
|
|
105
|
+
ref={imageListRef}
|
|
106
|
+
>
|
|
107
|
+
{props.pictureUrls.length > 0 && (
|
|
108
|
+
<div className="col-lg-5 h-100 w-25 d-flex gap-4 flex-row rounded-3">
|
|
109
|
+
{props.pictureUrls.map((picture, index) => (
|
|
110
|
+
<div
|
|
111
|
+
key={index}
|
|
112
|
+
className="col-lg-12 h-100 d-flex"
|
|
113
|
+
onClick={() => {
|
|
114
|
+
setCurrentImageIndex(index);
|
|
115
|
+
imageListRef.current!.scrollTo({
|
|
116
|
+
left: index * 150,
|
|
117
|
+
behavior: "smooth",
|
|
118
|
+
});
|
|
119
|
+
}}
|
|
120
|
+
role="button"
|
|
121
|
+
>
|
|
122
|
+
<img
|
|
123
|
+
src={picture.url}
|
|
124
|
+
alt={`Image ${index + 1}`}
|
|
125
|
+
className="col-12 h-100 rounded-3 object-fit-cover"
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
))}
|
|
129
|
+
</div>
|
|
130
|
+
)}
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
)}
|
|
138
|
+
</div>
|
|
139
|
+
);
|
|
140
|
+
}
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
.popup-overlay {
|
|
2
|
+
position: fixed; /* Fixed position to cover the whole screen */
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
|
|
8
|
+
display: flex; /* Flexbox to center the popup */
|
|
9
|
+
justify-content: center; /* Center horizontally */
|
|
10
|
+
align-items: center; /* Center vertically */
|
|
11
|
+
z-index: 10000; /* Ensure it's above other content */
|
|
12
|
+
}
|
|
13
|
+
|
|
1
14
|
.popUpHeader {
|
|
2
15
|
height: 48px;
|
|
3
16
|
font-size: 32px;
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import closeIcon from "../../assets/images/icon_close_2.png";
|
|
3
|
-
import "./Popup.css";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export default Popup;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import closeIcon from "../../assets/images/icon_close_2.png";
|
|
3
|
+
import "./Popup.css";
|
|
4
|
+
|
|
5
|
+
interface PopupProps {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
onCloseClick: () => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const Popup: React.FC<PopupProps> = ({ onCloseClick, children }) => {
|
|
11
|
+
return (
|
|
12
|
+
<div className="popup-overlay">
|
|
13
|
+
<div className="shareSection col-12 d-flex position-relative flex-column mx-auto justify-content-center col-5 col-lg-6 d-flex gap-4">
|
|
14
|
+
<div className="end-0 top-0 position-absolute ">
|
|
15
|
+
<img
|
|
16
|
+
src={closeIcon}
|
|
17
|
+
alt="close"
|
|
18
|
+
className="closeIcon me-2"
|
|
19
|
+
onClick={onCloseClick}
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
{children}
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default Popup;
|
|
@@ -21,8 +21,12 @@ interface PopupProps {
|
|
|
21
21
|
rooms: string;
|
|
22
22
|
askingPrice: string;
|
|
23
23
|
};
|
|
24
|
+
properties: {
|
|
25
|
+
pictures: { contentUrl: string }[];
|
|
26
|
+
};
|
|
24
27
|
onClick: any;
|
|
25
28
|
pictureUrl: any[];
|
|
29
|
+
baseUrl: string;
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
export default function PropertyCard(props: PopupProps) {
|
|
@@ -31,7 +35,10 @@ export default function PropertyCard(props: PopupProps) {
|
|
|
31
35
|
const handleLike = () => {
|
|
32
36
|
setLiked(!liked);
|
|
33
37
|
};
|
|
34
|
-
|
|
38
|
+
const pictureUrl =
|
|
39
|
+
props.properties.pictures && props.properties.pictures.length > 0
|
|
40
|
+
? `${props.baseUrl}${props.properties.pictures[0].contentUrl}`
|
|
41
|
+
: noImageIcon;
|
|
35
42
|
return (
|
|
36
43
|
<div
|
|
37
44
|
key={props.property.id}
|