Skip to content

Commit 1ac8e9f

Browse files
committed
feat(package): added flexlayout pattern to ngx-material-password-strength-info's component
1 parent f5ae1de commit 1ac8e9f

File tree

3 files changed

+42
-9
lines changed

3 files changed

+42
-9
lines changed

src/module/component/ngx-material-password-strength-info/ngx-material-password-strength-info.component.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<mat-card fxFlex fxLayout="row" fxLayoutAlign="center">
1+
<mat-card>
22
<mat-card-content fxLayout="column" fxLayoutAlign="start">
33

4-
<div fxLayout="row" fxLayoutGap="10px">
4+
<div class="info-row">
55
<div *ngIf="passwordComponent.containAtLeastOneLowerCaseLetter; then done else error">
66
</div>
77
<ng-template #done>
@@ -15,7 +15,7 @@
1515
</div>
1616
</div>
1717

18-
<div fxLayout="row" fxLayoutGap="10px">
18+
<div class="info-row">
1919
<div *ngIf="passwordComponent.containAtLeastOneUpperCaseLetter; then done else error">
2020
</div>
2121
<ng-template #done>
@@ -29,7 +29,7 @@
2929
</div>
3030
</div>
3131

32-
<div fxLayout="row" fxLayoutGap="10px">
32+
<div class="info-row">
3333
<div *ngIf="passwordComponent.containAtLeastOneDigit; then done else error">
3434
</div>
3535
<ng-template #done>
@@ -43,7 +43,7 @@
4343
</div>
4444
</div>
4545

46-
<div fxLayout="row" fxLayoutGap="10px">
46+
<div class="info-row">
4747
<div *ngIf="passwordComponent.containAtLeastOneSpecialChar; then done else error">
4848
</div>
4949
<ng-template #done>
@@ -57,7 +57,7 @@
5757
</div>
5858
</div>
5959

60-
<div fxLayout="row" fxLayoutGap="10px">
60+
<div class="info-row">
6161
<div *ngIf="passwordComponent.containAtLeastEightChars; then done else error">
6262
</div>
6363
<ng-template #done>
@@ -71,7 +71,7 @@
7171
</div>
7272
</div>
7373

74-
<div fxLayout="row" fxLayoutGap="10px">
74+
<div class="info-row">
7575
<div *ngIf="passwordComponent.strength === 100; then done else error">
7676
</div>
7777
<ng-template #done>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
mat-card {
2+
flex-direction: row;
3+
box-sizing: border-box;
4+
display: flex;
5+
place-content: stretch center;
6+
align-items: stretch;
7+
flex: 1 1 0%;
8+
9+
mat-card-content {
10+
flex-direction: column;
11+
box-sizing: border-box;
12+
display: flex;
13+
max-width: 100%;
14+
place-content: stretch flex-start;
15+
align-items: stretch;
16+
17+
mat-icon {
18+
margin-right: 10px;
19+
}
20+
21+
.info-row {
22+
flex-direction: row;
23+
box-sizing: border-box;
24+
display: flex;
25+
}
26+
27+
}
28+
29+
}
30+
31+

src/module/ngx-material-password-strength.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {CommonModule} from '@angular/common';
22
import {NgModule, ModuleWithProviders} from '@angular/core';
3-
import {MatProgressBarModule} from '@angular/material';
3+
import {MatCardModule, MatIconModule, MatProgressBarModule} from '@angular/material';
44

55
import {PasswordStrengthComponent} from './component/ngx-material-password-strength/password-strength.component';
66
import {
@@ -17,7 +17,9 @@ export {
1717
@NgModule({
1818
imports: [
1919
CommonModule,
20-
MatProgressBarModule
20+
MatProgressBarModule,
21+
MatCardModule,
22+
MatIconModule
2123
],
2224
exports: [PasswordStrengthComponent, NgxMaterialPasswordStrengthInfoComponent],
2325
declarations: [PasswordStrengthComponent, NgxMaterialPasswordStrengthInfoComponent]

0 commit comments

Comments
 (0)