rnadler / ng2-password-strength-bar

Angular 2/4/5 Password Strength Bar
http://bobonmedicaldevicesoftware.com/blog/2016/12/09/publishing-an-angular-2-component-npm-package/
MIT License
20 stars 17 forks source link

FeatureRequest: Define custom colors #16

Closed btxtiger closed 6 years ago

btxtiger commented 6 years ago

I'd like to adjust the bar colors to my page theme. An option could be to pass an array to the directive to overwrite the defaults:

<ng2-password-strength-bar 
    [colors]="myColors" 
    [passwordToCheck]="formData.passwd" 
    barLabel="Security: ">
</ng2-password-strength-bar>
export class myComponent {
   public myColors = [‘#F00’, ‘#F90’, ‘#FF0’, ‘#9F0’, ‘#0F0’];
}
rnadler commented 6 years ago

Resolved with PR #19.