Skip to content

Commit

Permalink
Update README.md with new options. Bump to v.1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rnadler committed Jun 3, 2018
1 parent 3b3da54 commit ace0ac5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ export class App {
<ng2-password-strength-bar
[passwordToCheck]="account.password"
[barLabel]="barLabel"
[barColors]="myColors">
[barColors]="myColors"
[baseColor]="baseColor"
[strengthLabels]="strengthLabels">
</ng2-password-strength-bar>
```
#### passwordToCheck (type: string)
Expand All @@ -88,9 +90,28 @@ export class App {

#### barColors (type: Array\<string\>, optional)
_(New in v1.2.0)_
- The variable can be used to define custom bar colors. This must be an Array of 5 strings!<br>
Lowest security level picks `colors[0]`, ..., the highest picks `colors[4]`.<br>
If not specified, the default is: `['#F00', '#F90', '#FF0', '#9F0', '#0F0']`
- The variable can be used to define custom bar colors.<br>
- This must be an Array of 5 strings.<br>
- Lowest security level picks `colors[0]`, ..., the highest picks `colors[4]`.<br>
- If not specified, the default is: `['#F00', '#F90', '#FF0', '#9F0', '#0F0']`

#### baseColor (type: string, optional)
_(New in v1.2.1)_
- The variable can be used to define the color of bars when no strength is applied (i.e. when there is no password text).<br>
- If not specified, the default is: '#DDD'.<br>
For example:
```angular2html
public baseColor = '#FFF';
```

#### strengthLabels (type: Array\<string\>, optional)
_(New in v1.2.1)_
- The variable can be used to define a strength label that will be appended to the colored bars.<br>
- This must be an Array of 5 strings.<br>
For example:
```angular2html
public strengthLabels = ['(Useless)', '(Weak)', '(Normal)', '(Strong)', '(Great!)'];
```

## Run the example application locally
- `git clone https://github.com/rnadler/ng2-password-strength-bar.git`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng2-password-strength-bar",
"version": "1.2.0",
"version": "1.2.1",
"description": "Angular 2 Password Strength Bar",
"scripts": {
"start": "npm run build && concurrently \"tsc -w\" \"lite-server\" ",
Expand Down

0 comments on commit ace0ac5

Please sign in to comment.