Skip to content

Commit 0da93aa

Browse files
committed
fix(package): change the type of color to themePalette
1 parent 9e86bc9 commit 0da93aa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges} from '@angular/core';
22
import {FormControl, ValidatorFn, Validators} from '@angular/forms';
3+
import {ThemePalette} from '@angular/material';
34
import {Criteria} from '../../enum/criteria.enum';
45
import {Colors} from '../../enum/colors.enum';
56
import {MatPasswordStrengthValidator} from '../../validator/mat-password-strength-validator';
@@ -51,7 +52,7 @@ export class MatPasswordStrengthComponent implements OnInit, OnChanges {
5152
validatorsArray: ValidatorFn[] = [];
5253

5354
private _strength = 0;
54-
private _color: string;
55+
private _color: ThemePalette;
5556

5657
Validators: ValidatorFn;
5758
matPasswordStrengthValidator = new MatPasswordStrengthValidator();
@@ -82,7 +83,7 @@ export class MatPasswordStrengthComponent implements OnInit, OnChanges {
8283
return this._strength ? this._strength : 0;
8384
}
8485

85-
get color(): string {
86+
get color(): ThemePalette {
8687

8788
if (this._strength <= 20) {
8889
return Colors.warn;

0 commit comments

Comments
 (0)