@sunggang/ui-lib 0.0.3 → 0.0.4
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/index.esm.js +6 -6
- package/package.json +1 -1
- package/src/lib/DropImage/index.d.ts +7 -1
package/index.esm.js
CHANGED
|
@@ -3431,7 +3431,7 @@ var DropImage = function(param) {
|
|
|
3431
3431
|
children: /*#__PURE__*/ jsx("div", {
|
|
3432
3432
|
className: "border-2 border-dashed border-gray-400 rounded-lg bg-gray-100",
|
|
3433
3433
|
children: /*#__PURE__*/ jsxs("div", {
|
|
3434
|
-
className: "flex items-center flex-col
|
|
3434
|
+
className: "flex items-center flex-col h-48 justify-center",
|
|
3435
3435
|
children: [
|
|
3436
3436
|
/*#__PURE__*/ jsx("p", {
|
|
3437
3437
|
className: "font-normal text-sm text-gray-400 py-4",
|
|
@@ -3450,7 +3450,7 @@ var DropImage = function(param) {
|
|
|
3450
3450
|
})),
|
|
3451
3451
|
preview && /*#__PURE__*/ jsx("div", {
|
|
3452
3452
|
className: "flex pt-2 gap-2",
|
|
3453
|
-
children: (previewFiles === null || previewFiles === void 0 ? void 0 : previewFiles.length) ? previewFiles.length > 0
|
|
3453
|
+
children: (previewFiles === null || previewFiles === void 0 ? void 0 : previewFiles.length) ? previewFiles.length > 0 ? previewFiles.map(function(item) {
|
|
3454
3454
|
return /*#__PURE__*/ jsx("div", {
|
|
3455
3455
|
children: /*#__PURE__*/ jsx("img", {
|
|
3456
3456
|
className: "w-24 h-24 object-cover",
|
|
@@ -3458,15 +3458,15 @@ var DropImage = function(param) {
|
|
|
3458
3458
|
alt: ""
|
|
3459
3459
|
})
|
|
3460
3460
|
}, item === null || item === void 0 ? void 0 : item.uuid);
|
|
3461
|
-
}) : imageUrls && imageUrls.length
|
|
3461
|
+
}) : null : imageUrls && imageUrls.length ? imageUrls.map(function(item) {
|
|
3462
3462
|
return /*#__PURE__*/ jsx("div", {
|
|
3463
3463
|
children: /*#__PURE__*/ jsx("img", {
|
|
3464
3464
|
className: "w-24 h-24 object-cover",
|
|
3465
|
-
src: item,
|
|
3465
|
+
src: item === null || item === void 0 ? void 0 : item.url,
|
|
3466
3466
|
alt: ""
|
|
3467
3467
|
})
|
|
3468
|
-
}, item);
|
|
3469
|
-
})
|
|
3468
|
+
}, item === null || item === void 0 ? void 0 : item.url);
|
|
3469
|
+
}) : null
|
|
3470
3470
|
})
|
|
3471
3471
|
]
|
|
3472
3472
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
interface ImageItem {
|
|
3
|
+
map?: any;
|
|
4
|
+
length?: ImageItem | undefined;
|
|
5
|
+
url: string;
|
|
6
|
+
book_items_category_id: string | null;
|
|
7
|
+
}
|
|
2
8
|
interface DropImageProps {
|
|
3
9
|
preview?: boolean;
|
|
4
|
-
imageUrls?:
|
|
10
|
+
imageUrls?: ImageItem[];
|
|
5
11
|
setFiles: React.Dispatch<React.SetStateAction<File[]>>;
|
|
6
12
|
}
|
|
7
13
|
export declare const DropImage: React.FC<DropImageProps>;
|