sprint-asia-custom-component 0.1.53 → 0.1.54
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 +530 -493
- package/package.json +1 -1
- package/src/components/dropzone/uploadfile/index.js +5 -1
package/package.json
CHANGED
|
@@ -9,6 +9,7 @@ const DropzoneUploadFile = ({
|
|
|
9
9
|
onDrop,
|
|
10
10
|
maxFiles = 1,
|
|
11
11
|
selectedFile,
|
|
12
|
+
error = "",
|
|
12
13
|
}) => {
|
|
13
14
|
const [errorMessage, setErrorMessage] = useState("");
|
|
14
15
|
|
|
@@ -40,7 +41,9 @@ const DropzoneUploadFile = ({
|
|
|
40
41
|
<div className="cursor-pointer">
|
|
41
42
|
<div
|
|
42
43
|
{...getRootProps({ className: "dropzone" })}
|
|
43
|
-
className=
|
|
44
|
+
className={`bg-neutral20 w-full h-28 rounded-lg border-2 ${
|
|
45
|
+
error ? "border-danger500" : "border-neutral50"
|
|
46
|
+
} border-dashed`}
|
|
44
47
|
>
|
|
45
48
|
<input {...getInputProps()} required={required} />
|
|
46
49
|
<div className="flex w-full h-full justify-center items-center text-center">
|
|
@@ -65,6 +68,7 @@ const DropzoneUploadFile = ({
|
|
|
65
68
|
</div>
|
|
66
69
|
</div>
|
|
67
70
|
</div>
|
|
71
|
+
{error && <p className="text-danger500 text-xs mt-1">{error}</p>}
|
|
68
72
|
<p className="text-xs text-neutral300 mt-1">{subtitle}</p>
|
|
69
73
|
</div>
|
|
70
74
|
);
|