From f312dac2bb4f39c96d6baaaa98bc59010c692757 Mon Sep 17 00:00:00 2001 From: Anthony Nahas Date: Fri, 26 Apr 2019 08:41:27 +0300 Subject: [PATCH] fix(package): override the color of the `mat-password-strength` bar #162 --- demo/src/app/home/home.component.html | 1 + .../mat-password-strength/mat-password-strength.component.html | 1 + .../mat-password-strength/mat-password-strength.component.scss | 3 +++ .../mat-password-strength/mat-password-strength.component.ts | 1 + 4 files changed, 6 insertions(+) diff --git a/demo/src/app/home/home.component.html b/demo/src/app/home/home.component.html index cdd979e4..765cbfc4 100644 --- a/demo/src/app/home/home.component.html +++ b/demo/src/app/home/home.component.html @@ -157,6 +157,7 @@

@angular-material-extensions/password-strength

diff --git a/src/module/component/mat-password-strength/mat-password-strength.component.html b/src/module/component/mat-password-strength/mat-password-strength.component.html index 57bdca8a..4de155fa 100644 --- a/src/module/component/mat-password-strength/mat-password-strength.component.html +++ b/src/module/component/mat-password-strength/mat-password-strength.component.html @@ -1,4 +1,5 @@ diff --git a/src/module/component/mat-password-strength/mat-password-strength.component.scss b/src/module/component/mat-password-strength/mat-password-strength.component.scss index e69de29b..8f9e077b 100644 --- a/src/module/component/mat-password-strength/mat-password-strength.component.scss +++ b/src/module/component/mat-password-strength/mat-password-strength.component.scss @@ -0,0 +1,3 @@ +::ng-deep .mat-progress-bar.mat-primary .mat-progress-bar-fill::after { + background-color: blue; +} diff --git a/src/module/component/mat-password-strength/mat-password-strength.component.ts b/src/module/component/mat-password-strength/mat-password-strength.component.ts index b288799b..a02ab4ea 100644 --- a/src/module/component/mat-password-strength/mat-password-strength.component.ts +++ b/src/module/component/mat-password-strength/mat-password-strength.component.ts @@ -19,6 +19,7 @@ export class MatPasswordStrengthComponent implements OnInit, OnChanges { @Input() password: string; @Input() customValidator: RegExp; @Input() externalError: boolean; + @Input() greenStrongPassword: boolean; @Input() enableLengthRule = true; @Input() enableLowerCaseLetterRule = true;