I'm attempting to do an inline edit function for a first and last name in a user profile. My layout looks like:
However, when I swap from using the standard input tag to using mat-form-field (like I'd like to be using for material), the user details ends up looking like so:
I've attempted to use various CSS to try and get this into place, but I'm unable to get everything back within the user detail line.
Checking it out in inspector, I see that there is a .mat-form-field-infix class that is being used, but I'm not able to override the padding and border-top properties it contains. I'm not sure how to approach altering mat-X elements as it seems material is more meant for keeping things as they come.
I would love some ideas.
HTML
<div fxLayout="column">
<div fxLayout="row"><span>{{user?.email}}</span></div>
<div fxLayout="row">
<div fxLayoutAlign="space-between">
<form [formGroup]="formGroup">
<mat-form-field>
<input matInput
formControlName="firstName"
value="{{user?.firstName}}"/>
</mat-form-field>
<mat-form-field>
<input matInput
formControlName="lastName"
value="{{user?.lastName}}"/>
</mat-form-field>
</form>
</div>
<div>
<button *ngIf="!edit" mat-icon-button (click)="editClicked()">
<mat-icon matTooltip="Edit User">edit</mat-icon>
</button>
</div>
</div>
</div>
CSS