File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed
packages/main/src/webComponents/UploadCollection Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -65,9 +65,13 @@ export const UploadCollectionComponent = () => {
65
65
const SimulateUploadComponent = () => {
66
66
const [children , setChildren ] = useState ([
67
67
< UploadCollectionItem
68
+ key= {' 0' }
68
69
file= {null }
69
70
fileName= {' file-name.txt' }
70
- thumbnail= {< img src= " https://sap.github.io/ui5-webcomponents/images/logo.png" / > }
71
+ uploadState= {UploadState .Ready }
72
+ thumbnail= {
73
+ < img src= " https://raw.githubusercontent.com/SAP/ui5-webcomponents/main/docs/images/UI5_logo_water.png" / >
74
+ }
71
75
>
72
76
< Text > Uploaded by: Susanne Schmitt · Uploaded On: 2019 - 04 - 20 < / Text >
73
77
< / UploadCollectionItem>
@@ -78,11 +82,14 @@ const SimulateUploadComponent = () => {
78
82
files .forEach ((file ) => {
79
83
setChildren ((prev ) => [
80
84
... prev,
81
- < UploadCollectionItem file= {file} fileName= {file .name } thumbnail= {< Icon name= " document" / > }>
82
- < Text > {`
83
- Last
84
- modified: ${ file .lastModifiedDate } ·
85
- Size: ${ (file .size / 1000 ).toFixed (2 )} KB` }< / Text >
85
+ < UploadCollectionItem
86
+ key= {file .name }
87
+ file= {file}
88
+ fileName= {file .name }
89
+ uploadState= {UploadState .Ready }
90
+ thumbnail= {< Icon name= {documentIcon} / > }
91
+ >
92
+ < Text > {` Last modified: ${ file .lastModifiedDate } · Size: ${ (file .size / 1000 ).toFixed (2 )} KB` }< / Text >
86
93
< / UploadCollectionItem>
87
94
]);
88
95
});
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ export const Default: Story = {
40
40
file = { file }
41
41
fileName = { file . name }
42
42
thumbnail = { < Icon name = { documentIcon } /> }
43
+ uploadState = { UploadState . Ready }
43
44
>
44
45
< Text > { `Last modified: ${ file . lastModifiedDate } · Size: ${ ( file . size / 1000 ) . toFixed ( 2 ) } KB` } </ Text >
45
46
</ UploadCollectionItem >
@@ -61,7 +62,10 @@ export const SimulateUpload: Story = {
61
62
key = { '0' }
62
63
file = { null }
63
64
fileName = { 'file-name.txt' }
64
- thumbnail = { < img src = "https://sap.github.io/ui5-webcomponents/images/logo.png" /> }
65
+ uploadState = { UploadState . Ready }
66
+ thumbnail = {
67
+ < img src = "https://raw.githubusercontent.com/SAP/ui5-webcomponents/main/docs/images/UI5_logo_water.png" />
68
+ }
65
69
>
66
70
< Text > Uploaded by: Susanne Schmitt · Uploaded On: 2019-04-20</ Text >
67
71
</ UploadCollectionItem >
@@ -76,6 +80,7 @@ export const SimulateUpload: Story = {
76
80
key = { file . name }
77
81
file = { file }
78
82
fileName = { file . name }
83
+ uploadState = { UploadState . Ready }
79
84
thumbnail = { < Icon name = { documentIcon } /> }
80
85
>
81
86
< Text > { `Last modified: ${ file . lastModifiedDate } · Size: ${ ( file . size / 1000 ) . toFixed ( 2 ) } KB` } </ Text >
You can’t perform that action at this time.
0 commit comments