Change file input to material button

master
trivernis 5 years ago
parent c0ce20f65d
commit 032d0f295d

@ -1,7 +1,8 @@
<div id="file-upload-dialog"> <div id="file-upload-dialog">
<h1 mat-dialog-title align="center">Upload a new Profile picture!</h1> <h1 mat-dialog-title align="center">Upload a new Profile picture!</h1>
<div class="uploadDialogContent" mat-dialog-content> <div class="uploadDialogContent" mat-dialog-content>
<input type="file" accept="image/*" (change)="onFileInputChange($event)" #name> <input style="display: none" id="input-file" type="file" accept="image/*" (change)="onFileInputChange($event)" #name>
<label for="input-file" class="mat-button mat-raised-button mat-primary">Choose File</label>
<div id="inputPreviewWrapper"> <div id="inputPreviewWrapper">
<h2 *ngIf="localFileUrl">Preview:</h2> <h2 *ngIf="localFileUrl">Preview:</h2>
<img *ngIf="localFileUrl" id="inputPreview" [src]="localFileUrl"/> <img *ngIf="localFileUrl" id="inputPreview" [src]="localFileUrl"/>

Loading…
Cancel
Save