sprint-asia-custom-component 0.1.130 → 0.1.132

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sprint-asia-custom-component",
3
3
  "main": "dist/index.js",
4
- "version": "0.1.130",
4
+ "version": "0.1.132",
5
5
  "private": false,
6
6
  "dependencies": {
7
7
  "@headlessui/react": "^1.7.18",
@@ -111,7 +111,6 @@ const CustomPhone = ({ mode = "Empty", data }) => {
111
111
  ) : (
112
112
  <>
113
113
  <span>{data}</span>
114
- <span className="ml-1 text-primary500">https://prezent.id/redeem/NXcralJZffsjksdDVds9</span>
115
114
  </>
116
115
  )}
117
116
  </p>
@@ -268,7 +267,6 @@ const CustomPhone = ({ mode = "Empty", data }) => {
268
267
  ) : (
269
268
  <>
270
269
  <span>{data}</span>
271
- <span className="ml-1 text-primary500">https://prezent.id/redeem/NXcralJZffsjksdDVds9</span>
272
270
  </>
273
271
  )}
274
272
  </p>
@@ -324,7 +322,6 @@ const CustomPhone = ({ mode = "Empty", data }) => {
324
322
  ) : (
325
323
  <>
326
324
  <span>{data}</span>
327
- <span className="ml-1 text-primary500">https://prezent.id/redeem/NXcralJZffsjksdDVds9</span>
328
325
  </>
329
326
  )}
330
327
  </p>
@@ -10,13 +10,16 @@ const DropzoneUploadFile = ({
10
10
  maxFiles = 1,
11
11
  selectedFile,
12
12
  error = "",
13
+ disabled,
13
14
  }) => {
14
15
  const [errorMessage, setErrorMessage] = useState("");
15
16
 
16
17
  const onDropRejected = (rejectedFiles) => {
17
18
  const file = rejectedFiles[0];
18
19
  if (file.errors[0]?.code === "file-too-large") {
19
- setErrorMessage("Your file is too large, Max file size is 5 MB");
20
+ setErrorMessage("Your file is too large. Max file size is 5 MB");
21
+ } else if (file.errors[0]?.code === "file-invalid-type") {
22
+ setErrorMessage("File format not supported. Please try again with PNG, JPEG, JPG, or PDF file within 5 MB");
20
23
  }
21
24
  };
22
25
 
@@ -24,12 +27,14 @@ const DropzoneUploadFile = ({
24
27
  onDrop,
25
28
  maxFiles,
26
29
  accept: {
27
- "image/*": [".jpeg", ".png"],
30
+ "image/jpeg": [".jpeg", ".jpg"],
31
+ "image/png": [".png"],
28
32
  "application/pdf": [".pdf"],
29
33
  },
30
34
  noKeyboard: true,
31
35
  maxSize: 5242881,
32
36
  onDropRejected,
37
+ disabled,
33
38
  });
34
39
 
35
40
  return (