Skip to content

Commit

Permalink
feat(multiple): bold form labels in readonly mode
Browse files Browse the repository at this point in the history
  • Loading branch information
trik committed Mar 30, 2022
1 parent 6eb6093 commit bed736f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion projects/ionic/forms/src/form.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ng-container *ngIf="formGroup|async as currentFormGroup">
<form novalidate [formGroup]="currentFormGroup!">
<form [class.ajf-form-readonly]="readonly" novalidate [formGroup]="currentFormGroup!">
<div class="ajf-form-container">
<ion-toolbar *ngIf="!hideTopToolbar && topBar" class="ajf-btn-strip">
<div class="ajf-topbar-buttons">
Expand Down
8 changes: 8 additions & 0 deletions projects/ionic/forms/src/form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ ajf-form {
display: block;
position: relative;

.ajf-form-readonly {
.ajf-field-entry {
> ion-label {
font-weight: bold;
}
}
}

form {
display: block;
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion projects/material/forms/src/form.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ng-container *ngIf="formGroup|async as fg">
<form novalidate [formGroup]="fg!">
<form [class.ajf-form-readonly]="readonly" novalidate [formGroup]="fg!">
<div class="ajf-form-container">
<mat-toolbar *ngIf="!hideTopToolbar && topBar" class="ajf-btn-strip">
<mat-button-toggle-group>
Expand Down
8 changes: 8 additions & 0 deletions projects/material/forms/src/form.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
ajf-form {
display: block;

.ajf-form-readonly {
.ajf-field-entry {
> label {
font-weight: bold;
}
}
}

.ajf-form-container {
display: flex;
flex-direction: column;
Expand Down

0 comments on commit bed736f

Please sign in to comment.