Skip to content

Commit f312dac

Browse files
committed
fix(package): override the color of the mat-password-strength bar #162
1 parent 0da93aa commit f312dac

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

demo/src/app/home/home.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ <h1>@angular-material-extensions/password-strength</h1>
157157

158158
<!--@angular-material-extensions/password-strength's main component-->
159159
<mat-password-strength #passwordComponentWithValidation
160+
[greenStrongPassword]="true"
160161
(onStrengthChanged)="onStrengthChanged($event)"
161162
[password]="passwordWithValidation.value">
162163
</mat-password-strength>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<mat-progress-bar mode="determinate"
2+
class="green"
23
[color]="color"
34
[value]="strength">
45
</mat-progress-bar>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
::ng-deep .mat-progress-bar.mat-primary .mat-progress-bar-fill::after {
2+
background-color: blue;
3+
}

src/module/component/mat-password-strength/mat-password-strength.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export class MatPasswordStrengthComponent implements OnInit, OnChanges {
1919
@Input() password: string;
2020
@Input() customValidator: RegExp;
2121
@Input() externalError: boolean;
22+
@Input() greenStrongPassword: boolean;
2223

2324
@Input() enableLengthRule = true;
2425
@Input() enableLowerCaseLetterRule = true;

0 commit comments

Comments
 (0)