Skip to content

Commit

Permalink
Adjust global error color and font weight
Browse files Browse the repository at this point in the history
  • Loading branch information
lkleisa committed Oct 20, 2023
1 parent c8b641d commit b2d2997
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<mat-form-field appearance="outline">
<textarea matInput class="w-100" formControlName="changeInfo"></textarea>
<div *ngIf="isTouchedOrDirty('changeInfo')">
<mat-error class="fw-bold" *ngFor="let errorKey of getErrorKeysOfFormField('changeInfo')">
<mat-error *ngFor="let errorKey of getErrorKeysOfFormField('changeInfo')">
{{ getErrorMessage(errorKey) }}
</mat-error>
</div>
Expand All @@ -15,7 +15,7 @@
<mat-form-field appearance="outline">
<textarea matInput formControlName="initiatives"></textarea>
<div *ngIf="isTouchedOrDirty('initiatives')">
<mat-error class="fw-bold" *ngFor="let errorKey of getErrorKeysOfFormField('initiatives')">
<mat-error *ngFor="let errorKey of getErrorKeysOfFormField('initiatives')">
{{ getErrorMessage(errorKey) }}
</mat-error>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
(focusin)="resetValue()"
></app-custom-input>
<div *ngIf="isTouchedOrDirty('value')">
<mat-error class="fw-bold error-font" *ngFor="let errorKey of getErrorKeysOfFormField('value')">
<mat-error *ngFor="let errorKey of getErrorKeysOfFormField('value')">
{{ errorMessages[errorKey.toUpperCase()] }}
</mat-error>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.error-font {
font-size: 13px;
}

.custom-input {
margin-top: 3px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h1 mat-dialog-title class="d-flex justify-content-center">This is an example di
<mat-label>Name</mat-label>
<input matInput formControlName="name" placeholder="Ex. Tom" />
<div *ngIf="isTouchedOrDirty('name')">
<mat-error class="fw-bold" *ngFor="let errorKey of getErrorKeysOfFormField('name')">
<mat-error *ngFor="let errorKey of getErrorKeysOfFormField('name')">
{{ errorMessages[errorKey.toUpperCase()] }}
</mat-error>
</div>
Expand All @@ -17,7 +17,7 @@ <h1 mat-dialog-title class="d-flex justify-content-center">This is an example di
<mat-radio-button value="other">Other</mat-radio-button>
</mat-radio-group>
<div *ngIf="isTouchedOrDirty('gender')">
<mat-error class="fw-bold" *ngFor="let errorKey of getErrorKeysOfFormField('gender')">
<mat-error *ngFor="let errorKey of getErrorKeysOfFormField('gender')">
{{ errorMessages[errorKey.toUpperCase()] }}
</mat-error>
</div>
Expand All @@ -29,7 +29,7 @@ <h1 mat-dialog-title class="d-flex justify-content-center">This is an example di
</mat-select>
</mat-form-field>
<div *ngIf="isTouchedOrDirty('hobby')">
<mat-error class="fw-bold" *ngFor="let errorKey of getErrorKeysOfFormField('hobby')">
<mat-error *ngFor="let errorKey of getErrorKeysOfFormField('hobby')">
{{ errorMessages[errorKey.toUpperCase()] }}
</mat-error>
</div>
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/style/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,7 @@ body pzsh-backdrop {
border: none;
padding: 0;
}

.mat-mdc-form-field-error {
color: #b3261b;
}

0 comments on commit b2d2997

Please sign in to comment.