Skip to content

Commit

Permalink
feat(package): added flexlayout pattern to ngx-material-password-stre…
Browse files Browse the repository at this point in the history
…ngth-info's component
  • Loading branch information
AnthonyNahas committed May 27, 2018
1 parent f5ae1de commit 1ac8e9f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<mat-card fxFlex fxLayout="row" fxLayoutAlign="center">
<mat-card>
<mat-card-content fxLayout="column" fxLayoutAlign="start">

<div fxLayout="row" fxLayoutGap="10px">
<div class="info-row">
<div *ngIf="passwordComponent.containAtLeastOneLowerCaseLetter; then done else error">
</div>
<ng-template #done>
Expand All @@ -15,7 +15,7 @@
</div>
</div>

<div fxLayout="row" fxLayoutGap="10px">
<div class="info-row">
<div *ngIf="passwordComponent.containAtLeastOneUpperCaseLetter; then done else error">
</div>
<ng-template #done>
Expand All @@ -29,7 +29,7 @@
</div>
</div>

<div fxLayout="row" fxLayoutGap="10px">
<div class="info-row">
<div *ngIf="passwordComponent.containAtLeastOneDigit; then done else error">
</div>
<ng-template #done>
Expand All @@ -43,7 +43,7 @@
</div>
</div>

<div fxLayout="row" fxLayoutGap="10px">
<div class="info-row">
<div *ngIf="passwordComponent.containAtLeastOneSpecialChar; then done else error">
</div>
<ng-template #done>
Expand All @@ -57,7 +57,7 @@
</div>
</div>

<div fxLayout="row" fxLayoutGap="10px">
<div class="info-row">
<div *ngIf="passwordComponent.containAtLeastEightChars; then done else error">
</div>
<ng-template #done>
Expand All @@ -71,7 +71,7 @@
</div>
</div>

<div fxLayout="row" fxLayoutGap="10px">
<div class="info-row">
<div *ngIf="passwordComponent.strength === 100; then done else error">
</div>
<ng-template #done>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
mat-card {
flex-direction: row;
box-sizing: border-box;
display: flex;
place-content: stretch center;
align-items: stretch;
flex: 1 1 0%;

mat-card-content {
flex-direction: column;
box-sizing: border-box;
display: flex;
max-width: 100%;
place-content: stretch flex-start;
align-items: stretch;

mat-icon {
margin-right: 10px;
}

.info-row {
flex-direction: row;
box-sizing: border-box;
display: flex;
}

}

}


6 changes: 4 additions & 2 deletions src/module/ngx-material-password-strength.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {CommonModule} from '@angular/common';
import {NgModule, ModuleWithProviders} from '@angular/core';
import {MatProgressBarModule} from '@angular/material';
import {MatCardModule, MatIconModule, MatProgressBarModule} from '@angular/material';

import {PasswordStrengthComponent} from './component/ngx-material-password-strength/password-strength.component';
import {
Expand All @@ -17,7 +17,9 @@ export {
@NgModule({
imports: [
CommonModule,
MatProgressBarModule
MatProgressBarModule,
MatCardModule,
MatIconModule
],
exports: [PasswordStrengthComponent, NgxMaterialPasswordStrengthInfoComponent],
declarations: [PasswordStrengthComponent, NgxMaterialPasswordStrengthInfoComponent]
Expand Down

0 comments on commit 1ac8e9f

Please sign in to comment.