ngx-file-drop
ngx-file-drop copied to clipboard
Bigger screen drop zone position misplace
-
In small screen drop zone have proper position. look into below image

-
In large screen drop zone misplace look into below 2 images
Anyone have solution ?
The trick is to override sizes. Here is what I came with for my page scss:
:host ::ng-deep {
.ngx-file-drop__drop-zone{
height: auto !important;
min-width: 20px !important;
padding: 2px !important;
}
.ngx-file-drop__content{
//height: 200px !important;
height: auto !important;
min-height: 20px !important;
min-width: 20px !important;
}
}
I additionally have custom content. Here is it in case styling doesn't work for default content:
<ngx-file-drop (onFileDrop)="dropped($event)">
<ng-template ngx-file-drop-content-tmp let-openFileSelector="openFileSelector">
<div class="flex" style="height: 110px; width: 110px;" (click)="openFileSelector()">
<div class="flex" style="padding: 2px;" >Your Logo *</div>
</div>
</ng-template>
</ngx-file-drop>