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 @@ -42,6 +42,7 @@ export const Default: Story = {
42
42
file = { file }
43
43
fileName = { file . name }
44
44
thumbnail = { < Icon name = { documentIcon } /> }
45
+ uploadState = { UploadState . Ready }
45
46
>
46
47
< Text > { `Last modified: ${ file . lastModifiedDate } · Size: ${ ( file . size / 1000 ) . toFixed ( 2 ) } KB` } </ Text >
47
48
</ UploadCollectionItem >
@@ -63,7 +64,10 @@ export const SimulateUpload: Story = {
63
64
key = { '0' }
64
65
file = { null }
65
66
fileName = { 'file-name.txt' }
66
- thumbnail = { < img src = "https://sap.github.io/ui5-webcomponents/img/logo.png" /> }
67
+ uploadState = { UploadState . Ready }
68
+ thumbnail = {
69
+ < img src = "https://raw.githubusercontent.com/SAP/ui5-webcomponents/main/docs/images/UI5_logo_water.png" />
70
+ }
67
71
>
68
72
< Text > Uploaded by: Susanne Schmitt · Uploaded On: 2019-04-20</ Text >
69
73
</ UploadCollectionItem >
@@ -78,6 +82,7 @@ export const SimulateUpload: Story = {
78
82
key = { file . name }
79
83
file = { file }
80
84
fileName = { file . name }
85
+ uploadState = { UploadState . Ready }
81
86
thumbnail = { < Icon name = { documentIcon } /> }
82
87
>
83
88
< 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