@@ -3,19 +3,18 @@ title: API
33sidebar_position : 2
44---
55
6- ## ImageUploadProps
6+ ## ImageUpload
77
88| Name | Description | Type | Default |
99| ------------------ | --------------------------------------- | ------------------------------------------------------- | ---------------- |
1010| children | custom upload zone | React.ReactNode | |
1111| width | image width | ` number ` | 100 |
1212| height | image height | ` number ` | ` width ` |
13- | value | default images | ` ValueType ` | |
13+ | value | images | ` ValueType ` | |
1414| onChange | callback for when the images changes | (value: ` ValueType ` ) => void | |
1515| transform | transform images to value | (images: ` ImageItem[] ` , max: number) => ` ValueType ` | defaultTransform |
1616| onUpload | callback for when the drop event occurs | (file: ` File ` ) => ` string ` \| ` Promise<string> ` | defaultUpload |
1717| max | max image number | ` number ` | Infinity |
18- | readonly | for preview | ` boolean ` | |
1918| className | root className | ` string ` | |
2019| itemClassName | image className | ` string ` | |
2120| dropzoneClassName | dropzone className | ` string ` | |
@@ -53,3 +52,21 @@ const defaultTransform = (images: ImageItem[], max: number): ValueType => {
5352 return value ;
5453};
5554```
55+
56+ ## ImagePreview
57+
58+ | Name | Description | Type | Default |
59+ | ------------------ | ------------------ | ------------------------------------------------------- | ------- |
60+ | width | image width | ` number ` | 100 |
61+ | height | image height | ` number ` | ` width ` |
62+ | value | images | ` ValueType ` | |
63+ | placeholder | placeholder images | ` ValueType ` | |
64+ | className | root className | ` string ` | |
65+ | itemClassName | image className | ` string ` | |
66+ | photoProviderProps | | Omit\< [ PhotoProviderProps] [ photoview-url ] , "children"\> | |
67+
68+ ## ImageProvider
69+
70+ | Name | Description | Type | Default |
71+ | ----------- | ------------------ | ----------- | ------- |
72+ | placeholder | placeholder images | ` ValueType ` | |
0 commit comments