px-react-ui-components 1.0.0 → 1.0.2

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 (41) hide show
  1. package/dist/components/MyFileUpload/MyFileUpload.js +16 -17
  2. package/dist/components/MyInput/MyInput.js +4 -7
  3. package/dist/components/MyTable/MyTable.js +9 -8
  4. package/package.json +13 -1
  5. package/.babelrc +0 -3
  6. package/src/components/MyAlert/MyAlert.css +0 -113
  7. package/src/components/MyAlert/MyAlert.jsx +0 -96
  8. package/src/components/MyContainer/MyContainer.jsx +0 -90
  9. package/src/components/MyContainer/MyContainer.module.css +0 -110
  10. package/src/components/MyContainer/MyContainerBody.jsx +0 -8
  11. package/src/components/MyContainer/MyContainerFooter.jsx +0 -8
  12. package/src/components/MyContainer/MyContainerRight.jsx +0 -11
  13. package/src/components/MyEditor/MyEditor.jsx +0 -252
  14. package/src/components/MyEditor/MyEditor.scss +0 -277
  15. package/src/components/MyFileUpload/MyFileUpload.jsx +0 -373
  16. package/src/components/MyFileUpload/MyFileUpload.module.css +0 -86
  17. package/src/components/MyImageCropper/MyImageCropper.jsx +0 -108
  18. package/src/components/MyInput/MyInput.jsx +0 -896
  19. package/src/components/MyInput/MyInput.module.css +0 -420
  20. package/src/components/MyMaps/YandexMaps.jsx +0 -186
  21. package/src/components/MyMenu/MenuItem.jsx +0 -62
  22. package/src/components/MyMenu/MyMenu.module.css +0 -102
  23. package/src/components/MyModal/MyModal.css +0 -83
  24. package/src/components/MyModal/MyModal.jsx +0 -78
  25. package/src/components/MyModal/MyModalBody.jsx +0 -8
  26. package/src/components/MyModal/MyModalFooter.jsx +0 -8
  27. package/src/components/MyNotFound/MyNotFound.css +0 -22
  28. package/src/components/MyNotFound/MyNotFound.jsx +0 -11
  29. package/src/components/MyScrollableCard/MyScrollableCard.jsx +0 -86
  30. package/src/components/MyTable/MyTable.jsx +0 -458
  31. package/src/components/MyTable/MyTable.module.css +0 -350
  32. package/src/components/MyTable/MyTableBody.jsx +0 -8
  33. package/src/components/MyTable/MyTableHead.jsx +0 -10
  34. package/src/components/MyTabs/MyTabPane.jsx +0 -9
  35. package/src/components/MyTabs/MyTabs.css +0 -105
  36. package/src/components/MyTabs/MyTabs.jsx +0 -63
  37. package/src/components/MyWaiting/MyWaiting.css +0 -28
  38. package/src/components/MyWaiting/MyWaiting.jsx +0 -27
  39. package/src/components/MyZoomImage/MyZoomImage.css +0 -0
  40. package/src/components/MyZoomImage/MyZoomImage.jsx +0 -139
  41. package/src/index.js +0 -15
@@ -3,11 +3,11 @@ import { PiCamera, PiFileArrowUpLight } from "react-icons/pi";
3
3
  import Resizer from "react-image-file-resizer";
4
4
  import Camera, { FACING_MODES, IMAGE_TYPES } from "react-html5-camera-photo";
5
5
  import "react-html5-camera-photo/build/css/index.css";
6
- import { useTranslation } from "../../context/TranslationContext";
7
6
  import MyWaiting from "../MyWaiting/MyWaiting";
8
7
  import { MyAlert, MyAlertType } from "../MyAlert/MyAlert";
9
8
  import styles from "./MyFileUpload.module.css";
10
9
  import MyModal from "../MyModal/MyModal";
10
+ import { MdOutlineAttachFile } from "react-icons/md";
11
11
  export const AcceptType = {
12
12
  ALL: "all",
13
13
  FILE: "file",
@@ -25,9 +25,6 @@ export default function MyFileUpload({
25
25
  maxSizeMB = 50,
26
26
  onData
27
27
  }) {
28
- const {
29
- t
30
- } = useTranslation();
31
28
  const [loading, setLoading] = useState(false);
32
29
  const [accepttypes, setAccepttypes] = useState(AcceptType.ALL);
33
30
  const [acceptlabel, setAcceptlabel] = useState(AcceptType.ALL);
@@ -43,27 +40,27 @@ export default function MyFileUpload({
43
40
  switch (accept) {
44
41
  case AcceptType.ALL:
45
42
  setAccepttypes(type_files + "," + type_image + "," + type_media);
46
- setAcceptlabel("PNG, JPG, PDF, RAR, ZIP, MP3, MP4, AVI, WAV veya Word-Excel Dosyaları");
43
+ setAcceptlabel("PNG, JPG, PDF, RAR, ZIP, MP3, MP4, AVI, WAV, Word-Excel");
47
44
  break;
48
45
  case AcceptType.IMAGE:
49
46
  setAccepttypes(type_image);
50
- setAcceptlabel(t("PNG veya JPG Dosyaları"));
47
+ setAcceptlabel("PNG, JPG ");
51
48
  break;
52
49
  case AcceptType.MEDIA:
53
50
  setAccepttypes(type_media);
54
- setAcceptlabel(t("MP3, MP4, AVI veya WAV Dosyaları"));
51
+ setAcceptlabel("MP3, MP4, AVI, WAV");
55
52
  break;
56
53
  case AcceptType.FILE:
57
54
  setAccepttypes(type_files + "," + type_image);
58
- setAcceptlabel(t("PDF, RAR, ZIP, PNG, JPG veya Word-Excel Dosyaları"));
55
+ setAcceptlabel("PDF, RAR, ZIP, PNG, JPG, Word-Excel ");
59
56
  break;
60
57
  case AcceptType.PDF:
61
58
  setAccepttypes(".pdf");
62
- setAcceptlabel(t("PDF Dosyaları"));
59
+ setAcceptlabel("PDF");
63
60
  break;
64
61
  case AcceptType.IMAGEPDF:
65
62
  setAccepttypes(type_image + ",.pdf");
66
- setAcceptlabel(t("PNG, JPG veya PDF Dosyaları"));
63
+ setAcceptlabel("PNG, JPG, PDF");
67
64
  break;
68
65
  }
69
66
  navigator.mediaDevices.enumerateDevices().then(deviceInfos => {
@@ -79,7 +76,7 @@ export default function MyFileUpload({
79
76
  let message = _error.map((e, i) => {
80
77
  return i + 1 + ".) <b><i>" + e.filename + "</i></b><br/>---- " + e.message + "<br/>";
81
78
  });
82
- MyAlert(t("Aşağıdaki dosyalar eklenemedi!") + "<br/><br/><div style='display: block;font-size:13px;width: 100%;text-align: left;'>" + message + "</div>", MyAlertType.WARNING);
79
+ MyAlert("<br/><br/><div style='display: block;font-size:13px;width: 100%;text-align: left;'>" + message + "</div>", MyAlertType.WARNING);
83
80
  }
84
81
  if (onData && (Array.isArray(resdata) && resdata.length > 0 || !Array.isArray(resdata) && resdata)) onData(resdata);
85
82
  setLoading(false);
@@ -99,12 +96,14 @@ export default function MyFileUpload({
99
96
  if (filesize > maxSizeMB) {
100
97
  _error.push({
101
98
  filename: file.name,
102
- message: t("Boyutu Max. Dosya Boyutundan büyük olamaz!") + ` <b>${maxSizeMB}MB</b>`
99
+ // message: "Boyutu Max. Dosya Boyutundan büyük olamaz!" + ` <b>${maxSizeMB}MB</b>`,
100
+ message: "Size cannot be larger than Max. File Size!" + ` <b>${maxSizeMB}MB</b>`
103
101
  });
104
102
  } else {
105
103
  _error.push({
106
104
  filename: file.name,
107
- message: t("Dosya türü desteklenmiyor!") + ` <b>${file_ext}</b>`
105
+ // message: t("Dosya türü desteklenmiyor!") + ` <b>${file_ext}</b>`,
106
+ message: "File type not supported!" + ` <b>${file_ext}</b>`
108
107
  });
109
108
  }
110
109
  if (files.length == i + 1 && response_files.length == 0) {
@@ -223,7 +222,7 @@ export default function MyFileUpload({
223
222
  className: styles.Icon
224
223
  }), /*#__PURE__*/React.createElement("h2", {
225
224
  className: styles.myFileUploadContainerItemIconText
226
- }, acceptlabel, /*#__PURE__*/React.createElement("br", null), " ", t("En fazla"), " ", maxSizeMB, " MB")), /*#__PURE__*/React.createElement("div", {
225
+ }, acceptlabel, /*#__PURE__*/React.createElement("br", null), " ", maxSizeMB, " MB")), /*#__PURE__*/React.createElement("div", {
227
226
  className: styles.myFileUploadContainerItemFile
228
227
  }, /*#__PURE__*/React.createElement("input", {
229
228
  type: "file",
@@ -235,7 +234,7 @@ export default function MyFileUpload({
235
234
  }), /*#__PURE__*/React.createElement("div", {
236
235
  className: styles.myFileUploadButton,
237
236
  onClick: () => fileInputRef.current.click()
238
- }, t("Dosya Seç")))), camera && /*#__PURE__*/React.createElement("div", {
237
+ }, /*#__PURE__*/React.createElement(MdOutlineAttachFile, null)))), camera && /*#__PURE__*/React.createElement("div", {
239
238
  className: styles.myFileUploadContainerItem
240
239
  }, /*#__PURE__*/React.createElement("div", {
241
240
  className: styles.myFileUploadContainerItemIcon
@@ -243,13 +242,13 @@ export default function MyFileUpload({
243
242
  className: styles.Icon
244
243
  }), /*#__PURE__*/React.createElement("div", {
245
244
  className: styles.myFileUploadContainerItemIconText
246
- }, /*#__PURE__*/React.createElement("span", null, t("Kameradan fotoğraf çekebilirsin.")))), /*#__PURE__*/React.createElement("div", {
245
+ }, /*#__PURE__*/React.createElement("span", null, "You can take a photo from the camera."))), /*#__PURE__*/React.createElement("div", {
247
246
  className: styles.myFileUploadContainerItemFile
248
247
  }, /*#__PURE__*/React.createElement("button", {
249
248
  type: "button",
250
249
  className: styles.myFileUploadButton,
251
250
  onClick: () => setCameraopen(true)
252
- }, t("Fotoğraf Çek")))))), /*#__PURE__*/React.createElement(MyModal, {
251
+ }, /*#__PURE__*/React.createElement(PiCamera, null)))))), /*#__PURE__*/React.createElement(MyModal, {
253
252
  show: cameraopen,
254
253
  onClose: () => setCameraopen(false),
255
254
  title: t("Fotoğraf Çek"),
@@ -1,8 +1,8 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React, { useEffect, useRef, useState } from "react";
3
3
  import styles from "./MyInput.module.css";
4
- import { PiCaretDownBold, PiEye, PiEyeSlash } from "react-icons/pi";
5
- import { useTranslation } from "../../context/TranslationContext";
4
+ import { PiCaretDownBold, PiEye, PiEyeSlash, PiImage } from "react-icons/pi";
5
+ import { MdOutlineAttachFile } from "react-icons/md";
6
6
  export const MyInputType = Object.freeze({
7
7
  TEXT: 'text',
8
8
  PASSWORD: 'password',
@@ -66,9 +66,6 @@ function MyInput({
66
66
  onMouseLeave = null,
67
67
  onRemoveImage = null
68
68
  }) {
69
- const {
70
- t
71
- } = useTranslation();
72
69
  const myInputId = `key${Date.now() + Math.random().toString(36).substr(2, 9)}`;
73
70
  const fileInputRef = useRef(null);
74
71
  const [loaded, setLoaded] = useState(false);
@@ -625,7 +622,7 @@ function MyInput({
625
622
  style: style,
626
623
  value: filtertext,
627
624
  onChange: e => setFiltertext(e.target.value),
628
- placeholder: placeholdersearchtext && placeholdersearchtext != "" ? placeholdersearchtext : (placeholder ? placeholder : myTitleLite) + " " + t("Ara"),
625
+ placeholder: placeholdersearchtext && placeholdersearchtext != "" ? placeholdersearchtext : (placeholder ? placeholder : myTitleLite) + " ...",
629
626
  onBlur: onMyBlur,
630
627
  onFocus: onMyFocus,
631
628
  onKeyDown: onMyKeyDown,
@@ -720,7 +717,7 @@ function MyInput({
720
717
  type: "button",
721
718
  onClick: () => fileInputRef.current.click(),
722
719
  className: styles.filebutton
723
- }, type === MyInputType.IMAGE ? t("Görsel Seç") : t("Dosya Seç")), /*#__PURE__*/React.createElement("input", _extends({
720
+ }, type === MyInputType.IMAGE ? /*#__PURE__*/React.createElement(PiImage, null) : /*#__PURE__*/React.createElement(MdOutlineAttachFile, null)), /*#__PURE__*/React.createElement("input", _extends({
724
721
  type: "file",
725
722
  ref: fileInputRef,
726
723
  onChange: e => onMyChange(e),
@@ -1,6 +1,5 @@
1
1
  import React, { useEffect, useState } from "react";
2
2
  import styles from "./MyTable.module.css";
3
- import { useTranslation } from "../../context/TranslationContext";
4
3
  export const MyTableIsNumeric = value => {
5
4
  if (value === null || value === undefined || value === "") return false;
6
5
  return !isNaN(value) && !isNaN(parseFloat(value));
@@ -31,9 +30,6 @@ function MyTable({
31
30
  onRowClick = null,
32
31
  onPageChange = null
33
32
  }) {
34
- const {
35
- t
36
- } = useTranslation();
37
33
  const tableid = `key${Date.now() + Math.random().toString(36).substr(2, 9)}`;
38
34
  const [curEmptyText, setCurEmptyText] = useState(emptyText);
39
35
  const [curTotalCount, setCurTotalCount] = useState(data ? data.length : totalCount);
@@ -106,7 +102,8 @@ function MyTable({
106
102
  }, [data, searchTerm, sortConfig, currentPage, pageSize]);
107
103
  useEffect(() => {
108
104
  if (emptyText == "") {
109
- setCurEmptyText(t("Henüz bir kayıt mevcut değil!"));
105
+ // setCurEmptyText(t("Henüz bir kayıt mevcut değil!"));
106
+ setCurEmptyText("No records found!");
110
107
  }
111
108
  return () => {};
112
109
  }, [tableid]);
@@ -271,8 +268,10 @@ function MyTable({
271
268
  }, searchable && /*#__PURE__*/React.createElement("div", {
272
269
  className: styles.searchContainer
273
270
  }, /*#__PURE__*/React.createElement("input", {
274
- type: "text",
275
- placeholder: t("Ara"),
271
+ type: "text"
272
+ // placeholder={t("Ara")}
273
+ ,
274
+ placeholder: "Search",
276
275
  value: searchTerm,
277
276
  className: styles.searchInput,
278
277
  onChange: e => setSearchTerm(e.target.value)
@@ -303,7 +302,9 @@ function MyTable({
303
302
  className: styles.td
304
303
  }, searchTerm != "" && /*#__PURE__*/React.createElement("span", {
305
304
  dangerouslySetInnerHTML: {
306
- __html: `${t("Aradığınız kriterlere uygun kayıt bulunamadı!")}<br/><b>(${searchTerm})</b>`
305
+ __html: `${
306
+ // t("Aradığınız kriterlere uygun kayıt bulunamadı!")
307
+ "No records found for the criteria you searched for!"}<br/><b>(${searchTerm})</b>`
307
308
  }
308
309
  }) || curEmptyText))))), totalPages > 0 && renderPagination());
309
310
  }
package/package.json CHANGED
@@ -1,7 +1,19 @@
1
1
  {
2
2
  "name": "px-react-ui-components",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "main": "dist/index.js",
5
+ "module": "dist/index.js",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/index.js",
10
+ "require": "./dist/index.js"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "README.md"
16
+ ],
5
17
  "scripts": {
6
18
  "build": "babel src --out-dir dist --copy-files"
7
19
  },
package/.babelrc DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "presets": ["@babel/preset-react"]
3
- }
@@ -1,113 +0,0 @@
1
-
2
- .react-confirm-alert-blur {
3
- filter: url(#gaussian-blur);
4
- filter: blur(2px);
5
- -webkit-filter: blur(2px);
6
- }
7
-
8
- .react-confirm-alert-overlay {
9
- position: fixed;
10
- top: 0;
11
- left: 0;
12
- right: 0;
13
- bottom: 0;
14
- z-index: 9999;
15
- background: rgba(99, 99, 99, 0.9);
16
- display: -webkit-flex;
17
- display: -moz-flex;
18
- display: -ms-flex;
19
- display: -o-flex;
20
- display: flex;
21
- justify-content: center;
22
- -ms-align-items: center;
23
- align-items: center;
24
- opacity: 0;
25
- -webkit-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
26
- -moz-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
27
- -o-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
28
- animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;
29
- }
30
-
31
- .react-confirm-alert-body {
32
- font-family: "Nunito", sans-serif;
33
- width: 90%; /* Daha geniş cihazlarda %90 genişlik */
34
- max-width: 400px; /* Maksimum genişlik sınırı */
35
- padding: 20px;
36
- text-align: left;
37
- background: #fff;
38
- border-radius: 10px;
39
- box-shadow: 0 20px 75px rgba(0, 0, 0, 0.13);
40
- color: #666;
41
- text-align: center;
42
- margin: 0 auto; /* Orta hizalama */
43
- }
44
-
45
- @media (max-width: 600px) {
46
- .react-confirm-alert-body {
47
- width: 95%; /* Küçük ekranlarda daha fazla boşluk */
48
- max-width: 320px; /* Maksimum genişlik daha küçük */
49
- }
50
- }
51
-
52
- .react-confirm-alert-svg {
53
- position: absolute;
54
- top: 0;
55
- left: 0;
56
- }
57
-
58
- .react-confirm-alert-body > h1 {
59
- margin-top: 0;
60
- color: #1e293b !important;
61
- font-weight: bold;
62
- font-size: 1.3em;
63
- border-radius: 0px;
64
- }
65
-
66
- .react-confirm-alert-body > h3 {
67
- margin: 0;
68
- font-size: 3.5em !important;
69
- color: #1e293b !important;
70
- }
71
-
72
- .react-confirm-alert-button-group {
73
- display: -webkit-flex;
74
- display: -moz-flex;
75
- display: -ms-flex;
76
- display: -o-flex;
77
- display: flex;
78
- justify-content: space-between;
79
- margin-top: 30px;
80
- }
81
-
82
- .react-confirm-alert-button-group > button {
83
- outline: none;
84
- background: #1e293b;
85
- border: none;
86
- display: inline-block;
87
- padding: 10px 18px;
88
- color: #fff;
89
- margin-right: 10px;
90
- border-radius: 5px;
91
- font-size: 1em;
92
- cursor: pointer;
93
- width: 100%;
94
-
95
- &:hover {
96
- opacity: 0.8;
97
- }
98
-
99
- &:last-child {
100
- background: #506280 !important;
101
- color: #fff;
102
- }
103
- &:first-child {
104
- background: #1e293b !important;
105
- color: #fff;
106
- }
107
- }
108
-
109
- .react-confirm-alert-body {
110
- width: 500px;
111
- max-height: 300px;
112
- overflow: auto;
113
- }
@@ -1,96 +0,0 @@
1
- import React from "react";
2
-
3
- import { confirmAlert } from "react-confirm-alert";
4
- import "react-confirm-alert/src/react-confirm-alert.css";
5
- import "./MyAlert.css";
6
-
7
- // import Swal from "sweetalert2";
8
-
9
- export const MyAlertType = {
10
- WARNING: 'warning',
11
- ERROR: 'error',
12
- SUCCESS: 'success',
13
- INFO: 'info',
14
- QUESTION: 'question'
15
- };
16
-
17
- Object.freeze(MyAlertType); // Enum sabitlerini değiştirmeyi engeller
18
-
19
- export const MyAlert = (message, type = MyAlertType.INFO, { title = '', buttontext = { confirm: 'Tamam', cancel: 'İptal' }, callback = null } = {}) => {
20
- let _showCancelButton = false;
21
- switch (type) {
22
- case MyAlertType.WARNING:
23
- title = title ? title : 'Uyarı';
24
- break;
25
- case MyAlertType.ERROR:
26
- title = title ? title : 'Hata!';
27
- break;
28
- case MyAlertType.SUCCESS:
29
- title = title ? title : 'İşlem Başarılı';
30
- break;
31
- case MyAlertType.INFO:
32
- title = title ? title : 'Bilgi';
33
- break;
34
- case MyAlertType.QUESTION:
35
- title = title ? title : 'Onaylıyor musunuz?';
36
- _showCancelButton = true;
37
-
38
- if (buttontext.confirm == "Tamam") {
39
- buttontext.confirm = "Evet";
40
- buttontext.cancel = "Hayır";
41
- }
42
- break;
43
- }
44
-
45
- let _buttons = [
46
- {
47
- label: buttontext.confirm,
48
- onClick: () => {
49
- if (callback) callback({ isConfirmed: true, isDenied: false });
50
- },
51
- },
52
- ];
53
-
54
- if (_showCancelButton) {
55
- _buttons.push({
56
- label: buttontext.cancel,
57
- onClick: () => {
58
- if (callback) callback({ isConfirmed: false, isDenied: true });
59
- },
60
- });
61
- }
62
-
63
- confirmAlert({
64
- title: title,
65
- message: <div dangerouslySetInnerHTML={{
66
- __html: (typeof message === 'string' ? message : message.props?.children || message.toString())
67
- }}></div>,
68
- buttons: _buttons,
69
- onClickOutside: () => {
70
- if (callback) callback({ isConfirmed: false, isDenied: true });
71
- },
72
- onKeypressEscape: () => {
73
- if (callback) callback({ isConfirmed: false, isDenied: true });
74
- }
75
- });
76
-
77
- // Swal.fire({
78
- // title: title,
79
- // html: message,
80
- // icon: type,
81
- // focusConfirm: true,
82
- // confirmButtonText: buttontext.confirm,
83
- // cancelButtonText: buttontext.cancel,
84
- // showCancelButton: _showCancelButton
85
- // }).then((result) => {
86
- // if (callback){
87
- // callback(result);
88
- // }
89
- // // /* Read more about isConfirmed, isDenied below */
90
- // // if (result.isConfirmed) {
91
- // // // Swal.fire("Saved!", "", "success");
92
- // // } else if (result.isDenied) {
93
- // // // Swal.fire("Changes are not saved", "", "info");
94
- // // }
95
- // });
96
- }
@@ -1,90 +0,0 @@
1
- import React from "react";
2
- import styles from "./MyContainer.module.css";
3
-
4
- function MyContainer({
5
- children,
6
- title = "",
7
- description = null,
8
- icon = null,
9
- className = null,
10
- titleTextStyle = null,
11
- style = null,
12
- headerClassName = null,
13
- headerStyle = null,
14
- bodyClassName = null,
15
- bodyStyle = null,
16
- footerClassName = null,
17
- footerStyle = null,
18
- }) {
19
- const arrChild = React.Children.toArray(children);
20
-
21
- let childHeaderRight = null;
22
- let childBody = null;
23
- let childFooter = null;
24
-
25
- for (let i = 0; i < arrChild.length; i++) {
26
- const el = arrChild[i];
27
- if (el.type && el.type.toString().includes("MyContainerTagRight")) {
28
- childHeaderRight = el;
29
- } else if (
30
- el.type &&
31
- el.type.toString().includes("MyContainerTagBody")
32
- ) {
33
- childBody = el;
34
- } else if (
35
- el.type &&
36
- el.type.toString().includes("MyContainerTagFooter")
37
- ) {
38
- childFooter = el;
39
- } else if (childBody == null) {
40
- childBody = el;
41
- } else if (
42
- childBody != null &&
43
- childFooter == null &&
44
- i == arrChild.length - 1
45
- ) {
46
- childFooter = el;
47
- }
48
- }
49
-
50
- return (
51
- <section
52
- className={`${styles.container} ${className || ""}`}
53
- style={style}
54
- >
55
- {(title || childHeaderRight) && (
56
- <div className={`${styles.header} ${headerClassName || ""}`} style={headerStyle}>
57
- {title &&
58
- <>
59
- <h3 className={styles.title} style={titleTextStyle}>
60
- {title}
61
- </h3>
62
- {description && (
63
- <span className={styles.description}>
64
- {description}
65
- </span>
66
- )}
67
- </>
68
- }
69
- {childHeaderRight && childHeaderRight}
70
- </div>
71
- )}
72
- <div
73
- className={`${styles.body} ${bodyClassName || ""}`}
74
- style={(title ? { paddingTop: "12px" } : null)}
75
- >
76
- {childBody}
77
- </div>
78
- {childFooter && (
79
- <div
80
- className={`${styles.footer} ${footerClassName || ""}`}
81
- style={(title ? { paddingTop: "12px" } : null) }
82
- >
83
- {childFooter}
84
- </div>
85
- )}
86
- </section>
87
- );
88
- }
89
-
90
- export default MyContainer;
@@ -1,110 +0,0 @@
1
- .container {
2
- position: relative;
3
- display: block;
4
- width: 100%;
5
- background: #ffff;
6
- border-radius: 15px;
7
- }
8
-
9
- .header {
10
- position: relative;
11
- display: block;
12
- width: 100%;
13
- padding: 15px;
14
- padding-left: 20px;
15
- padding-bottom: 7.5px;
16
- border-bottom: 1px solid #d0d6de;
17
- color: #464255;
18
- }
19
-
20
- .title {
21
- margin: 0px !important;
22
- }
23
-
24
- .description {
25
- font-size: 12px;
26
- }
27
-
28
- .rightBlock {
29
- position: absolute;
30
- right: 15px;
31
- z-index: 2;
32
- top: 50%;
33
- transform: translateY(-50%);
34
- display: flex;
35
- flex-direction: row;
36
- gap: 10px;
37
- }
38
-
39
- .rightBlock button {
40
- display: flex;
41
- flex-direction: row;
42
- gap: 10px;
43
- justify-items: center;
44
- align-items: center;
45
- padding: 10px 15px;
46
- }
47
-
48
- .body {
49
- display: block;
50
- width: 100%;
51
- padding: 15px;
52
- }
53
-
54
- .footer {
55
- display: block;
56
- width: 100%;
57
- padding: 15px;
58
- border-top: 1px solid #d0d6de;
59
- }
60
-
61
- @media screen and (max-width: 768px) {
62
- .header {
63
- padding: 10px;
64
- padding-left: 15px;
65
- padding-bottom: 5px;
66
- }
67
-
68
- .rightBlock {
69
- position: relative;
70
- right: auto;
71
- top: auto;
72
- transform: none;
73
- margin-top: 10px;
74
- justify-content: flex-end;
75
- }
76
-
77
- .rightBlock button {
78
- padding: 8px 12px;
79
- font-size: 14px;
80
- }
81
-
82
- .body {
83
- padding: 10px;
84
- }
85
-
86
- .footer {
87
- padding: 10px;
88
- }
89
- }
90
-
91
- @media screen and (max-width: 480px) {
92
- .header {
93
- padding: 8px;
94
- padding-left: 12px;
95
- padding-bottom: 4px;
96
- }
97
-
98
- .rightBlock button {
99
- padding: 6px 10px;
100
- font-size: 12px;
101
- }
102
-
103
- .body {
104
- padding: 8px;
105
- }
106
-
107
- .footer {
108
- padding: 8px;
109
- }
110
- }
@@ -1,8 +0,0 @@
1
- import React from "react";
2
-
3
- function MyContainerBody({ children }) {
4
- return (
5
- <div className="MyContainerTagBody">{children}</div>
6
- )
7
- }
8
- export default MyContainerBody
@@ -1,8 +0,0 @@
1
- import React from "react";
2
-
3
- function MyContainerFooter({ children }) {
4
- return (
5
- <div className="MyContainerTagFooter">{children}</div>
6
- )
7
- }
8
- export default MyContainerFooter
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- import styles from "./MyContainer.module.css";
3
-
4
- function MyContainerRight({ children }) {
5
- return (
6
- <div className={"MyContainerTagRight " + styles.rightBlock}>
7
- {children}
8
- </div>
9
- );
10
- }
11
- export default MyContainerRight;