Skip to content

Commit

Permalink
fix(package): change the type of color to themePalette
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyNahas committed Apr 24, 2019
1 parent 9e86bc9 commit 0da93aa
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges} from '@angular/core';
import {FormControl, ValidatorFn, Validators} from '@angular/forms';
import {ThemePalette} from '@angular/material';
import {Criteria} from '../../enum/criteria.enum';
import {Colors} from '../../enum/colors.enum';
import {MatPasswordStrengthValidator} from '../../validator/mat-password-strength-validator';
Expand Down Expand Up @@ -51,7 +52,7 @@ export class MatPasswordStrengthComponent implements OnInit, OnChanges {
validatorsArray: ValidatorFn[] = [];

private _strength = 0;
private _color: string;
private _color: ThemePalette;

Validators: ValidatorFn;
matPasswordStrengthValidator = new MatPasswordStrengthValidator();
Expand Down Expand Up @@ -82,7 +83,7 @@ export class MatPasswordStrengthComponent implements OnInit, OnChanges {
return this._strength ? this._strength : 0;
}

get color(): string {
get color(): ThemePalette {

if (this._strength <= 20) {
return Colors.warn;
Expand Down

0 comments on commit 0da93aa

Please sign in to comment.