nestiq-component-library 1.1.58 → 1.1.59

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.
Files changed (49) hide show
  1. package/dist/assets/images/Icon_rightArrow.svg +3 -0
  2. package/dist/assets/images/LayersIcon.svg +5 -0
  3. package/dist/assets/images/blackarrow-Right.svg +3 -0
  4. package/dist/assets/images/blckarrow-Left.svg +3 -0
  5. package/dist/assets/images/{card-arrow-left.55343410142dad3f.svg → card-arrow-left.28090aba4b4f2006.svg} +4 -4
  6. package/dist/assets/images/{card-arrow-right.60b3bf0e34c1800d.svg → card-arrow-right.c60af4cbbd49f3aa.svg} +4 -4
  7. package/dist/assets/images/chevron-left.svg +3 -0
  8. package/dist/assets/images/default-property.jpg +0 -0
  9. package/dist/assets/images/heartIcon.svg +3 -0
  10. package/dist/assets/images/icon-close-white.webp +0 -0
  11. package/dist/assets/images/icon_checkmark.9b48c4a4bc651b08.svg +10 -0
  12. package/dist/assets/images/icon_close 2.e41bb9a4db48e048.png +0 -0
  13. package/dist/assets/images/icon_close_2.png +0 -0
  14. package/dist/assets/images/icon_gallery.svg +4 -0
  15. package/dist/assets/images/icon_map.svg +10 -0
  16. package/dist/assets/images/icon_share_1.svg +3 -0
  17. package/dist/assets/images/layer_icon.svg +5 -0
  18. package/dist/assets/images/locationIcon.0af399c78e0cdc20.svg +4 -0
  19. package/dist/assets/images/locationIcon.svg +4 -0
  20. package/dist/assets/images/locationIconBlack.svg +4 -0
  21. package/dist/assets/images/{more.ce14789c8d37e327.svg → more.1e158adc48fbb406.svg} +12 -12
  22. package/dist/assets/images/no-image-icon.png +0 -0
  23. package/dist/assets/images/warning.6f99cb4c6a048b47.svg +11 -0
  24. package/dist/components/Button/Button.js +6 -0
  25. package/dist/components/ImageListPopup/ImageListPopup.js +26 -0
  26. package/dist/components/NewPropertyCard/NewPropertyCard.d.ts +1 -0
  27. package/dist/components/Popup/Popup.js +12 -0
  28. package/dist/components/SharePopup/PopUp.d.ts +7 -0
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.es.js +132 -103
  31. package/dist/index.es.js.map +1 -1
  32. package/dist/index.js +132 -102
  33. package/dist/index.js.map +1 -1
  34. package/package.json +1 -1
  35. package/rollup.config.mjs +36 -36
  36. package/src/assets/images/card-arrow-left.svg +4 -4
  37. package/src/assets/images/card-arrow-right.svg +4 -4
  38. package/src/assets/images/more.svg +12 -12
  39. package/src/components/FloorPlanPopup/FloorPlanPopup.css +3 -3
  40. package/src/components/FloorPlanPopup/FloorPlanPopup.tsx +83 -83
  41. package/src/components/ImageListPopup/ImageListPopup.css +83 -83
  42. package/src/components/ImageListPopup/ImageListPopup.tsx +141 -141
  43. package/src/components/MessagePopup/MessagePopUp.tsx +156 -156
  44. package/src/components/NewPropertyCard/NewPropertyCard.tsx +285 -283
  45. package/src/components/Popup/Popup.tsx +29 -29
  46. package/src/components/ToastWrapper/ToastWrapper.tsx +25 -25
  47. package/src/index.tsx +1 -1
  48. package/src/models/message.model.ts +7 -7
  49. package/nestiq-component-library-1.1.58.tgz +0 -0
@@ -1,283 +1,285 @@
1
- import React, { useRef, useState } from "react";
2
- // import { FormattedMessage } from "react-intl";
3
- import locationIcon from "../../assets/images/locationIcon.svg";
4
- import "../NewPropertyCard/NewPropertyCard.css";
5
- import noImageIcon from "../../assets/Images/default-property.jpg";
6
- import { formatPrice } from "../../functions/util";
7
- import shareIcon from "../../assets/Images/icon_share_1.svg";
8
- import moreIcon from "../../assets/Images/more.svg";
9
- import arrowLeft from "../../assets/Images/card-arrow-left.svg";
10
- import arrowRight from "../../assets/Images/card-arrow-right.svg";
11
- import iconLayers from "../../assets/Images/layer_icon.svg";
12
- import FloorPlanPopup from "../FloorPlanPopup/FloorPlanPopup";
13
- import MessagePopUp from "../MessagePopup/MessagePopUp";
14
- import SharePopup from "../SharePopup/SharePopup";
15
- import { MessageModel } from "../../models/message.model";
16
-
17
- interface PopupProps {
18
- property: {
19
- city: string;
20
- historicalProtection: boolean;
21
- basement: boolean;
22
- balcony: boolean;
23
- terrace: boolean;
24
- guestBathroom: boolean;
25
- bathrooms: string;
26
- usableArea: string;
27
- id: string;
28
- rooms: string;
29
- constructedArea: string;
30
- title: string;
31
- evaluation?: {
32
- askingPrice: number;
33
- };
34
- expose: {
35
- title: string;
36
- };
37
- pictures: { contentUrl: string }[];
38
- };
39
- baseUrl: string;
40
- userData: {
41
- firstname: string;
42
- lastname: string;
43
- };
44
- themesList: any;
45
- floorPlanUrl: string;
46
- onMessagePopupSubmitClick: (formValues: MessageModel) => void;
47
- }
48
- export default function PropertyCard(props: PopupProps) {
49
- const [liked, setLiked] = useState(false);
50
- const [mainImage, setMainImage] = useState<string | null>(null);
51
- const [currentImageIndex, setCurrentImageIndex] = useState(0);
52
- const imageListRef = useRef<HTMLDivElement>(null);
53
- const [floorPlan, setFloorPlan] = useState(false);
54
- const [messagePopUp, setMessagPopUp] = useState(false);
55
- const [sharePopUp, setSharePopUp] = useState(false);
56
-
57
- const pictureUrls =
58
- props.property?.pictures?.length > 0
59
- ? props.property.pictures.map(
60
- (picture) => `${props.baseUrl}${picture.contentUrl}`,
61
- )
62
- : [noImageIcon];
63
-
64
- // setPictureUrls(pictureUrls);
65
- const handleLike = () => {
66
- setLiked(!liked);
67
- };
68
- const floorPlanOnClick = () => {
69
- if (props.floorPlanUrl) {
70
- setFloorPlan(true);
71
- }
72
- };
73
- const handleMessagPopUp = () => {
74
- setMessagPopUp(true);
75
- };
76
- const handleSharePopUp = () => {
77
- setSharePopUp(true);
78
- };
79
-
80
- const handleArrowClickInMainImage = (direction: string) => {
81
- if (!props.property || pictureUrls.length === 0) return;
82
-
83
- let newIndex = currentImageIndex;
84
- if (direction === "left") {
85
- newIndex =
86
- (currentImageIndex - 1 + pictureUrls.length) % pictureUrls.length;
87
- } else if (direction === "right") {
88
- newIndex = (currentImageIndex + 1) % pictureUrls.length;
89
- }
90
-
91
- setCurrentImageIndex(newIndex);
92
- setMainImage(pictureUrls[newIndex]);
93
-
94
- // Ensure the ref exists before calling scrollTo
95
- if (imageListRef.current) {
96
- imageListRef.current.scrollTo({
97
- left: newIndex * 150,
98
- behavior: "smooth",
99
- });
100
- } else {
101
- console.warn("imageListRef is not set");
102
- }
103
- };
104
-
105
- return (
106
- <div className="d-flex flex-row ">
107
- <div className="d-flex flex-column col-12">
108
- <div
109
- key={props.property.id}
110
- className="card-bod mb-4 position-relative cardStyles w-100"
111
- style={{
112
- backgroundImage: `url(${mainImage || pictureUrls[0]})`,
113
- backgroundSize: "cover",
114
- backgroundPosition: "center",
115
- }}
116
- >
117
- <div className="d-flex flex-row justify-content-between gap-5">
118
- <div
119
- className="d-flex"
120
- style={{ position: "absolute", left: "0" }}
121
- onClick={() => handleArrowClickInMainImage("left")}
122
- role="button"
123
- >
124
- <img src={arrowLeft} />
125
- </div>
126
- <div></div>
127
- <div
128
- onClick={() => handleArrowClickInMainImage("right")}
129
- role="button"
130
- >
131
- <img
132
- src={arrowRight}
133
- style={{ position: "absolute", right: "0" }}
134
- />
135
- </div>
136
- </div>
137
- <div
138
- className="d-flex flex-row align-self-end justify-item-start justify-content-between align-item-start gap-1 mb-2 ms-4"
139
- style={{ position: "absolute", left: "0" }}
140
- >
141
- <div className="cardTag">{`${currentImageIndex + 1}/${
142
- pictureUrls.length
143
- }`}</div>
144
- <div
145
- className="Grundriss kontact-button-text "
146
- role="button"
147
- onClick={floorPlanOnClick}
148
- >
149
- <img src={iconLayers} className="" style={{ width: "18px" }} />{" "}
150
- Grundriss
151
- </div>
152
- </div>
153
- </div>
154
- </div>
155
- <div className="d-flex flex-column listing-compacts col-12">
156
- <div className="d-flex align-self-end justify-content-end gap-2">
157
- <img
158
- src={shareIcon}
159
- alt="Location Icon"
160
- className="w-50 "
161
- onClick={handleSharePopUp}
162
- />
163
- <img src={moreIcon} alt="Location Icon" className="" />
164
- </div>
165
- <div>
166
- <span className="propertyTitle align-items-start ">
167
- {props.property.expose?.title}
168
- </span>
169
- </div>
170
- <div>
171
- {" "}
172
- <div className="d-flex ">
173
- <img src={locationIcon} alt="Location Icon" className="Vector" />
174
- <span className="locationTexts ">
175
- {props.property.city || "N/A"}
176
- </span>
177
- </div>
178
- </div>
179
- <div className="d-flex flex-row ">
180
- <div className="d-flex col-5">
181
- <span className="value ">
182
- {formatPrice(props.property?.evaluation?.askingPrice ?? 0)} €
183
- <br />
184
- <span className="details">Kaufpreis</span>
185
- </span>
186
- </div>
187
- <span className="text-dark value col-lg-4 col-md-4 col-sm-6 text-truncate ">
188
- {+props.property.rooms}
189
- <br />
190
- <span className="details">
191
- {" "}
192
- <span>Zimmer</span>
193
- </span>
194
- </span>
195
- <span className="text-dark value col-lg-3 col-md-3 col-sm-4 text-truncate ">
196
- {+props.property.bathrooms}
197
- <br />
198
- <span className="details">
199
- <span>Bad</span>
200
- </span>
201
- </span>
202
- <span className="text-dark value col-lg-6 col-md-5 col-sm-7 me-3">
203
- {props.property.usableArea} m²
204
- <br />
205
- <span className="details">
206
- <span>Wohnfläche</span>
207
- </span>
208
- </span>
209
- </div>
210
- <div className="labelTopClass d-flex top-0 start-0 col-sm-5 col-lg-8 ">
211
- <div className=" align-items-center d-flex flex-row gap-2">
212
- {props.property.historicalProtection && (
213
- <label className="thirdLabels justify-content-center align-items-center">
214
- <span className="layersText ">{"Denkmalschutz"}</span>
215
- </label>
216
- )}
217
-
218
- {props.property.basement && (
219
- <label className="secondLabel justify-content-center align-items-center">
220
- <span className="layersText ">{"Keller"}</span>
221
- </label>
222
- )}
223
- {props.property.balcony && (
224
- <label className="secondLabel justify-content-center align-items-center">
225
- <span className="layersText ">{"Balkon"}</span>
226
- </label>
227
- )}
228
- </div>
229
- </div>
230
- <div className="d-flex flex-row align-items-center gap-2">
231
- {props.property.terrace && (
232
- <label className="thirdLabels justify-content-center align-items-center ">
233
- <span className="layersText">{"Terrace"}</span>
234
- </label>
235
- )}
236
- <div className="d-flex ">
237
- {props.property.guestBathroom && (
238
- <label className="col-1 thirdLabels justify-content-center align-items-center ">
239
- <span className="layersText ">{"Gäste-WC"}</span>
240
- </label>
241
- )}
242
- </div>
243
- </div>
244
- <div className="Frame-136 d-flex flex-row">
245
- <div className="d-flex flex-column col-5 justify-content-between">
246
- <span className="h4">
247
- <strong>McGrath</strong>{" "}
248
- </span>
249
- </div>
250
- <div className="d-flex flex-column justify-content-between">
251
- <span>
252
- <strong>Herr John McGrath</strong>{" "}
253
- </span>
254
- <span>McGrath</span>
255
- <button
256
- className="kontactbutton text-light "
257
- onClick={handleMessagPopUp}
258
- role="button"
259
- >
260
- <span className="kontact-button-text">Kontakt aufnehmen </span>
261
- </button>
262
- </div>
263
- </div>
264
- </div>
265
- {floorPlan && (
266
- <FloorPlanPopup
267
- contentUrl={props.floorPlanUrl}
268
- onCloseClick={() => setFloorPlan(false)}
269
- />
270
- )}
271
- {messagePopUp && (
272
- <MessagePopUp
273
- onCloseClick={() => setMessagPopUp(false)}
274
- sellerFirstName={props.userData?.firstname}
275
- sellerLastName={props.userData?.lastname}
276
- themesList={props.themesList}
277
- onSubmit={props.onMessagePopupSubmitClick}
278
- />
279
- )}
280
- {sharePopUp && <SharePopup onClick={() => setSharePopUp(false)} />}
281
- </div>
282
- );
283
- }
1
+ import React, { useRef, useState } from "react";
2
+ // import { FormattedMessage } from "react-intl";
3
+ import locationIcon from "../../assets/images/locationIcon.svg";
4
+ import "../NewPropertyCard/NewPropertyCard.css";
5
+ import noImageIcon from "../../assets/Images/default-property.jpg";
6
+ import { formatPrice } from "../../functions/util";
7
+ import shareIcon from "../../assets/Images/icon_share_1.svg";
8
+ import moreIcon from "../../assets/Images/more.svg";
9
+ import arrowLeft from "../../assets/Images/card-arrow-left.svg";
10
+ import arrowRight from "../../assets/Images/card-arrow-right.svg";
11
+ import iconLayers from "../../assets/Images/layer_icon.svg";
12
+ import FloorPlanPopup from "../FloorPlanPopup/FloorPlanPopup";
13
+ import MessagePopUp from "../MessagePopup/MessagePopUp";
14
+ import SharePopup from "../SharePopup/SharePopup";
15
+ import { MessageModel } from "../../models/message.model";
16
+
17
+ interface PopupProps {
18
+ property: {
19
+ city: string;
20
+ historicalProtection: boolean;
21
+ basement: boolean;
22
+ balcony: boolean;
23
+ terrace: boolean;
24
+ guestBathroom: boolean;
25
+ bathrooms: string;
26
+ usableArea: string;
27
+ id: string;
28
+ rooms: string;
29
+ constructedArea: string;
30
+ title: string;
31
+ evaluation?: {
32
+ askingPrice: number;
33
+ };
34
+ expose: {
35
+ title: string;
36
+ };
37
+ pictures: { contentUrl: string }[];
38
+ };
39
+ baseUrl: string;
40
+ userData: {
41
+ firstname: string;
42
+ lastname: string;
43
+ };
44
+ themesList: any;
45
+ floorPlanUrl: string;
46
+ onMessagePopupSubmitClick: (formValues: MessageModel) => void;
47
+ messageOnClick: () => void;
48
+ }
49
+ export default function PropertyCard(props: PopupProps) {
50
+ const [liked, setLiked] = useState(false);
51
+ const [mainImage, setMainImage] = useState<string | null>(null);
52
+ const [currentImageIndex, setCurrentImageIndex] = useState(0);
53
+ const imageListRef = useRef<HTMLDivElement>(null);
54
+ const [floorPlan, setFloorPlan] = useState(false);
55
+ const [messagePopUp, setMessagPopUp] = useState(false);
56
+ const [sharePopUp, setSharePopUp] = useState(false);
57
+
58
+ const pictureUrls =
59
+ props.property?.pictures?.length > 0
60
+ ? props.property.pictures.map(
61
+ (picture) => `${props.baseUrl}${picture.contentUrl}`,
62
+ )
63
+ : [noImageIcon];
64
+
65
+ // setPictureUrls(pictureUrls);
66
+ const handleLike = () => {
67
+ setLiked(!liked);
68
+ };
69
+ const floorPlanOnClick = () => {
70
+ if (props.floorPlanUrl) {
71
+ setFloorPlan(true);
72
+ }
73
+ };
74
+ const handleMessagPopUp = () => {
75
+ // setMessagPopUp(true);
76
+ props.messageOnClick();
77
+ };
78
+ const handleSharePopUp = () => {
79
+ setSharePopUp(true);
80
+ };
81
+
82
+ const handleArrowClickInMainImage = (direction: string) => {
83
+ if (!props.property || pictureUrls.length === 0) return;
84
+
85
+ let newIndex = currentImageIndex;
86
+ if (direction === "left") {
87
+ newIndex =
88
+ (currentImageIndex - 1 + pictureUrls.length) % pictureUrls.length;
89
+ } else if (direction === "right") {
90
+ newIndex = (currentImageIndex + 1) % pictureUrls.length;
91
+ }
92
+
93
+ setCurrentImageIndex(newIndex);
94
+ setMainImage(pictureUrls[newIndex]);
95
+
96
+ // Ensure the ref exists before calling scrollTo
97
+ if (imageListRef.current) {
98
+ imageListRef.current.scrollTo({
99
+ left: newIndex * 150,
100
+ behavior: "smooth",
101
+ });
102
+ } else {
103
+ console.warn("imageListRef is not set");
104
+ }
105
+ };
106
+
107
+ return (
108
+ <div className="d-flex flex-row ">
109
+ <div className="d-flex flex-column col-12">
110
+ <div
111
+ key={props.property.id}
112
+ className="card-bod mb-4 position-relative cardStyles w-100"
113
+ style={{
114
+ backgroundImage: `url(${mainImage || pictureUrls[0]})`,
115
+ backgroundSize: "cover",
116
+ backgroundPosition: "center",
117
+ }}
118
+ >
119
+ <div className="d-flex flex-row justify-content-between gap-5">
120
+ <div
121
+ className="d-flex"
122
+ style={{ position: "absolute", left: "0" }}
123
+ onClick={() => handleArrowClickInMainImage("left")}
124
+ role="button"
125
+ >
126
+ <img src={arrowLeft} />
127
+ </div>
128
+ <div></div>
129
+ <div
130
+ onClick={() => handleArrowClickInMainImage("right")}
131
+ role="button"
132
+ >
133
+ <img
134
+ src={arrowRight}
135
+ style={{ position: "absolute", right: "0" }}
136
+ />
137
+ </div>
138
+ </div>
139
+ <div
140
+ className="d-flex flex-row align-self-end justify-item-start justify-content-between align-item-start gap-1 mb-2 ms-4"
141
+ style={{ position: "absolute", left: "0" }}
142
+ >
143
+ <div className="cardTag">{`${currentImageIndex + 1}/${
144
+ pictureUrls.length
145
+ }`}</div>
146
+ <div
147
+ className="Grundriss kontact-button-text "
148
+ role="button"
149
+ onClick={floorPlanOnClick}
150
+ >
151
+ <img src={iconLayers} className="" style={{ width: "18px" }} />{" "}
152
+ Grundriss
153
+ </div>
154
+ </div>
155
+ </div>
156
+ </div>
157
+ <div className="d-flex flex-column listing-compacts col-12">
158
+ <div className="d-flex align-self-end justify-content-end gap-2">
159
+ <img
160
+ src={shareIcon}
161
+ alt="Location Icon"
162
+ className="w-50 "
163
+ onClick={handleSharePopUp}
164
+ />
165
+ <img src={moreIcon} alt="Location Icon" className="" />
166
+ </div>
167
+ <div>
168
+ <span className="propertyTitle align-items-start ">
169
+ {props.property.expose?.title}
170
+ </span>
171
+ </div>
172
+ <div>
173
+ {" "}
174
+ <div className="d-flex ">
175
+ <img src={locationIcon} alt="Location Icon" className="Vector" />
176
+ <span className="locationTexts ">
177
+ {props.property.city || "N/A"}
178
+ </span>
179
+ </div>
180
+ </div>
181
+ <div className="d-flex flex-row ">
182
+ <div className="d-flex col-5">
183
+ <span className="value ">
184
+ {formatPrice(props.property?.evaluation?.askingPrice ?? 0)} €
185
+ <br />
186
+ <span className="details">Kaufpreis</span>
187
+ </span>
188
+ </div>
189
+ <span className="text-dark value col-lg-4 col-md-4 col-sm-6 text-truncate ">
190
+ {+props.property.rooms}
191
+ <br />
192
+ <span className="details">
193
+ {" "}
194
+ <span>Zimmer</span>
195
+ </span>
196
+ </span>
197
+ <span className="text-dark value col-lg-3 col-md-3 col-sm-4 text-truncate ">
198
+ {+props.property.bathrooms}
199
+ <br />
200
+ <span className="details">
201
+ <span>Bad</span>
202
+ </span>
203
+ </span>
204
+ <span className="text-dark value col-lg-6 col-md-5 col-sm-7 me-3">
205
+ {props.property.usableArea}
206
+ <br />
207
+ <span className="details">
208
+ <span>Wohnfläche</span>
209
+ </span>
210
+ </span>
211
+ </div>
212
+ <div className="labelTopClass d-flex top-0 start-0 col-sm-5 col-lg-8 ">
213
+ <div className=" align-items-center d-flex flex-row gap-2">
214
+ {props.property.historicalProtection && (
215
+ <label className="thirdLabels justify-content-center align-items-center">
216
+ <span className="layersText ">{"Denkmalschutz"}</span>
217
+ </label>
218
+ )}
219
+
220
+ {props.property.basement && (
221
+ <label className="secondLabel justify-content-center align-items-center">
222
+ <span className="layersText ">{"Keller"}</span>
223
+ </label>
224
+ )}
225
+ {props.property.balcony && (
226
+ <label className="secondLabel justify-content-center align-items-center">
227
+ <span className="layersText ">{"Balkon"}</span>
228
+ </label>
229
+ )}
230
+ </div>
231
+ </div>
232
+ <div className="d-flex flex-row align-items-center gap-2">
233
+ {props.property.terrace && (
234
+ <label className="thirdLabels justify-content-center align-items-center ">
235
+ <span className="layersText">{"Terrace"}</span>
236
+ </label>
237
+ )}
238
+ <div className="d-flex ">
239
+ {props.property.guestBathroom && (
240
+ <label className="col-1 thirdLabels justify-content-center align-items-center ">
241
+ <span className="layersText ">{"Gäste-WC"}</span>
242
+ </label>
243
+ )}
244
+ </div>
245
+ </div>
246
+ <div className="Frame-136 d-flex flex-row">
247
+ <div className="d-flex flex-column col-5 justify-content-between">
248
+ <span className="h4">
249
+ <strong>McGrath</strong>{" "}
250
+ </span>
251
+ </div>
252
+ <div className="d-flex flex-column justify-content-between">
253
+ <span>
254
+ <strong>Herr John McGrath</strong>{" "}
255
+ </span>
256
+ <span>McGrath</span>
257
+ <button
258
+ className="kontactbutton text-light "
259
+ onClick={handleMessagPopUp}
260
+ role="button"
261
+ >
262
+ <span className="kontact-button-text">Kontakt aufnehmen </span>
263
+ </button>
264
+ </div>
265
+ </div>
266
+ </div>
267
+ {floorPlan && (
268
+ <FloorPlanPopup
269
+ contentUrl={props.floorPlanUrl}
270
+ onCloseClick={() => setFloorPlan(false)}
271
+ />
272
+ )}
273
+ {/* {messagePopUp && (
274
+ <MessagePopUp
275
+ onCloseClick={() => setMessagPopUp(false)}
276
+ sellerFirstName={props.userData?.firstname}
277
+ sellerLastName={props.userData?.lastname}
278
+ themesList={props.themesList}
279
+ onSubmit={props.onMessagePopupSubmitClick}
280
+ />
281
+ )}
282
+ {sharePopUp && <SharePopup onClick={() => setSharePopUp(false)} />} */}
283
+ </div>
284
+ );
285
+ }
@@ -1,29 +1,29 @@
1
- import React from "react";
2
- import closeIcon from "../../assets/images/icon_close_2.png";
3
- import "./Popup.css";
4
- import "../../styles/common.css";
5
-
6
- interface PopupProps {
7
- children: React.ReactNode;
8
- onCloseClick: () => void;
9
- }
10
-
11
- const Popup: React.FC<PopupProps> = ({ onCloseClick, children }) => {
12
- return (
13
- <div className="popup-overlay">
14
- <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">
15
- <div className="end-0 top-0 position-absolute ">
16
- <img
17
- src={closeIcon}
18
- alt="close"
19
- className="closeIcon me-2"
20
- onClick={onCloseClick}
21
- />
22
- </div>
23
- {children}
24
- </div>
25
- </div>
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
+ import "../../styles/common.css";
5
+
6
+ interface PopupProps {
7
+ children: React.ReactNode;
8
+ onCloseClick: () => void;
9
+ }
10
+
11
+ const Popup: React.FC<PopupProps> = ({ onCloseClick, children }) => {
12
+ return (
13
+ <div className="popup-overlay">
14
+ <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">
15
+ <div className="end-0 top-0 position-absolute ">
16
+ <img
17
+ src={closeIcon}
18
+ alt="close"
19
+ className="closeIcon me-2"
20
+ onClick={onCloseClick}
21
+ />
22
+ </div>
23
+ {children}
24
+ </div>
25
+ </div>
26
+ );
27
+ };
28
+
29
+ export default Popup;