File tree Expand file tree Collapse file tree 7 files changed +18
-16
lines changed
projects/material-addons/src
readonly/readonly-form-field-wrapper
src/app/example-components/stepper Expand file tree Collapse file tree 7 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ import {
1010 OnInit ,
1111 Output ,
1212 SimpleChanges ,
13- ViewChild
14- } from " @angular/core" ;
15- import { ControlContainer , FormGroupDirective } from " @angular/forms" ;
16- import { ReadOnlyFormFieldComponent } from " ../readonly-form-field/readonly-form-field.component" ;
17- import { NgIf } from " @angular/common" ;
18- import { ObserversModule } from " @angular/cdk/observers" ;
13+ ViewChild ,
14+ } from ' @angular/core' ;
15+ import { ControlContainer , FormGroupDirective } from ' @angular/forms' ;
16+ import { ReadOnlyFormFieldComponent } from ' ../readonly-form-field/readonly-form-field.component' ;
17+ import { NgIf } from ' @angular/common' ;
18+ import { ObserversModule } from ' @angular/cdk/observers' ;
1919
2020/**
2121 * Wraps a mat-form-field to replace it by a readOnly representation if necessary
Original file line number Diff line number Diff line change 11.header {
22 overflow : hidden ;
3- outline : var (--warn -color );
3+ outline : var (--error -color );
44 cursor : pointer ;
55 box-sizing : content-box ;
66 -webkit-tap-highlight-color : transparent ;
2626
2727.step-state-error {
2828 width : 5px ;
29- background : var (--warn -color );
29+ background : var (--error -color );
3030}
3131
3232.step-state-neutral {
3939}
4040
4141.red-error {
42- color : var (--warn -color );
42+ color : var (--error -color );
4343}
4444
4545.check-border {
4646 border-color : #d3d3d3 ;
4747}
4848
4949.error-border {
50- border-color : var (--warn -color );
50+ border-color : var (--error -color );
5151}
Original file line number Diff line number Diff line change 1212 [attr.aria-labelledby] ="_getStepLabelId(i) "
1313 [attr.aria-expanded] ="selectedIndex === i "
1414 >
15- < div data-cy ="stepper-content " class =" vertical-content " >
15+ < div data-cy ="stepper-content ">
1616 < ng-container
1717 [ngTemplateOutlet] ="step.content "
1818 [ngTemplateOutletContext] ="{
Original file line number Diff line number Diff line change 2727 outline : 0 ;
2828}
2929
30- .vertical-content {
31- padding : 0 24px 0 24px ;
32- }
33-
3430.step-container {
3531 border-left : 1px solid lightgrey ;
3632 border-right : 1px solid lightgrey ;
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ $default-palette: (
4949 $table-hover-color : theme .get-table-hover-color ($main-primary );
5050 $background-color : theme .get-background-color ();
5151 $warn-color : map-get (theme .$primary-palette , warn-color );
52+ $error-color : map-get (theme .$primary-palette , error-color );
5253 $hover-color : map-get (theme .$primary-palette , 50 );
5354 $panel-color : map-get (theme .$primary-palette , 900 );
5455 $panel-background-color : theme .map-get-or-default (theme .$primary-palette , panel-background-color );
@@ -82,6 +83,7 @@ $default-palette: (
8283 --hover-color : #{$hover-color } ;
8384 --table-hover-color : #{$table-hover-color } ;
8485 --warn-color : #{$warn-color } ;
86+ --error-color : #{$error-color } ;
8587 --background-color : #{$background-color } ;
8688 --panel-color : #{$panel-color } ;
8789 --panel-background-color : #{$panel-background-color } ;
Original file line number Diff line number Diff line change 55 < mat-form-field >
66 < mat-label > Firstname</ mat-label >
77 < input matInput placeholder ="Firstname " formControlName ="firstName " />
8+ < mat-error > Please enter a first name</ mat-error >
89 </ mat-form-field >
910 < mat-form-field >
1011 < mat-label > Lastname</ mat-label >
1112 < input matInput placeholder ="Lastname " formControlName ="lastName " />
13+ < mat-error > Please enter a last name</ mat-error >
1214 </ mat-form-field >
1315 </ div >
1416 </ form >
1921 < mat-form-field >
2022 < mat-label > Email</ mat-label >
2123 < input matInput placeholder ="Firstname " formControlName ="email " />
24+ < mat-error > Please enter an email</ mat-error >
2225 </ mat-form-field >
2326 < mat-form-field >
2427 < mat-label > Phone</ mat-label >
2528 < input matInput placeholder ="Lastname " formControlName ="phone " />
29+ < mat-error > Please enter a phone number</ mat-error >
2630 </ mat-form-field >
2731 </ div >
2832 </ form >
You can’t perform that action at this time.
0 commit comments