Skip to content

Commit eac59c6

Browse files
committed
feat(package): optional input to hide the password score in the info component #68
1 parent 0e77f7e commit eac59c6

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

demo/src/app/examples/examples.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ <h1>Explore the library and try these examples <3</h1>
162162
<!--Password's strength info-->
163163
<mat-password-strength-info
164164
*ngIf="toggle4.checked"
165-
[passwordComponent]="passwordComponent4">
165+
[passwordComponent]="passwordComponent4"
166+
[enableScoreInfo]="true">
166167
</mat-password-strength-info>
167168
</mat-card-content>
168169

src/module/component/mat-password-strength-info/mat-password-strength-info.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
</div>
7272
</div>
7373

74-
<div class="info-row">
74+
<div *ngIf="enableScoreInfo" class="info-row">
7575
<div *ngIf="passwordComponent.strength === 100; then done else error">
7676
</div>
7777
<ng-template #done>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ export class MatPasswordStrengthInfoComponent {
1212
@Input()
1313
passwordComponent: MatPasswordStrengthComponent;
1414

15+
@Input()
16+
enableScoreInfo = false;
17+
1518
}

0 commit comments

Comments
 (0)