File tree Expand file tree Collapse file tree 5 files changed +46
-10
lines changed Expand file tree Collapse file tree 5 files changed +46
-10
lines changed Original file line number Diff line number Diff line change 1- < div class ="default-style ">
2- < dx-button [text] ="buttonText " (onClick) ="onClick($event) "> </ dx-button >
1+ < div class ="demo-container ">
2+ < div class ="file-uploader-block ">
3+ < dx-file-uploader
4+ id ="file-uploader "
5+ [multiple] ="true "
6+ uploadMode ="useButtons "
7+ [allowCanceling] ="true "
8+ accept ="image/* "
9+ labelText ="Drop Images Here to Upload... "
10+ [maxFileSize] ="32000000 "
11+ dropZone =".file-uploader-block "
12+ > </ dx-file-uploader >
13+ </ div >
314</ div >
Original file line number Diff line number Diff line change 1- .default-style {
2- margin : 50px ;
3- width : 90vw ;
4- }
Original file line number Diff line number Diff line change 11import { NgModule } from '@angular/core' ;
22import { BrowserModule } from '@angular/platform-browser' ;
3- import { DxButtonModule } from 'devextreme-angular/ui/button ' ;
3+ import { DxFileUploaderModule } from 'devextreme-angular/ui/file-uploader ' ;
44import { AppRoutingModule } from './app-routing.module' ;
55import { AppComponent } from './app.component' ;
66
@@ -11,7 +11,7 @@ import { AppComponent } from './app.component';
1111 imports : [
1212 BrowserModule ,
1313 AppRoutingModule ,
14- DxButtonModule ,
14+ DxFileUploaderModule ,
1515 ] ,
1616 providers : [ ] ,
1717 bootstrap : [ AppComponent ] ,
Original file line number Diff line number Diff line change 77 < meta name ="viewport " content ="width=device-width, initial-scale=1 " />
88 < link rel ="icon " type ="image/x-icon " href ="favicon.ico " />
99 </ head >
10- < body >
10+ < body class =" dx-viewport " >
1111 < app-root > </ app-root >
1212 </ body >
1313</ html >
Original file line number Diff line number Diff line change 1- /* You can add global styles to this file, and also import other style files */
1+ .demo-container {
2+ margin : 50px ;
3+ height : 50vh ;
4+ }
5+
6+ .file-uploader-block {
7+ width : 100% ;
8+ height : 100% ;
9+ background-color : #f5f5f5 ;
10+ border-radius : 16px ;
11+ }
12+
13+ #file-uploader {
14+ height : 100% ;
15+ }
16+
17+ .dx-fileuploader-input-wrapper {
18+ position : relative ;
19+ display : flex ;
20+ flex-direction : column ;
21+ align-items : center ;
22+ }
23+
24+ .dx-fileuploader-input-container {
25+ text-align : center ;
26+ }
27+
28+ #file-uploader .dx-fileuploader-wrapper {
29+ overflow-y : auto ;
30+ }
You can’t perform that action at this time.
0 commit comments