Skip to content

Commit 4071c63

Browse files
committed
feat(package): enhanced - i18n | ngx-auth-firebaseui-login comp. #316
1 parent e4dc5f8 commit 4071c63

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

src/module/components/ngx-auth-firebaseui-login/ngx-auth-firebaseui-login.component.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414
<form name="loginForm" [formGroup]="loginForm" novalidate>
1515

1616
<mat-form-field [appearance]="appearance">
17-
<input matInput placeholder="Email" formControlName="email">
17+
<input matInput [placeholder]="emailText" formControlName="email">
1818
<mat-icon matSuffix color="primary">email</mat-icon>
1919
<mat-error *ngIf="loginForm.get('email').hasError('required')">
20-
Email is required
20+
{{emailErrorRequiredText}}
2121
</mat-error>
2222
<mat-error
2323
*ngIf="!loginForm.get('email').hasError('required') &&
2424
loginForm.get('email').hasError('email')">
25-
Please enter a valid email address
25+
{{emailErrorPatternText}}
2626
</mat-error>
2727
</mat-form-field>
2828

2929
<mat-form-field [appearance]="appearance">
30-
<input matInput type="password" placeholder="Password" formControlName="password">
30+
<input matInput type="password" [placeholder]="passwordText" formControlName="password">
3131
<mat-icon matSuffix color="primary">lock</mat-icon>
3232
<mat-error>
33-
Password is required
33+
{{passwordErrorRequiredText}}
3434
</mat-error>
3535
</mat-form-field>
3636

@@ -60,6 +60,10 @@
6060
<span class="text">{{orLabelText}}</span>
6161
</div>
6262

63+
<!-- <ngx-auth-firebaseui-providers layout="column"-->
64+
<!-- theme="raised"-->
65+
<!-- [providers]="providers"></ngx-auth-firebaseui-providers>-->
66+
6367
<button mat-raised-button class="google">
6468
Google
6569
</button>

src/module/components/ngx-auth-firebaseui-login/ngx-auth-firebaseui-login.component.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ export class NgxAuthFirebaseuiLoginComponent implements OnInit {
2727
@Input() dontHaveAnAccountText = 'Don\'t have an account?';
2828
@Input() createAccountButtonText = 'Create an account';
2929

30+
// i18n email
31+
@Input() emailText = 'Email';
32+
@Input() emailErrorRequiredText = 'Email is required';
33+
@Input() emailErrorPatternText = 'Please enter a valid email address';
34+
35+
// i18n password
36+
@Input() passwordText = 'Password';
37+
@Input() passwordErrorRequiredText = 'Password is required';
38+
3039
// Events
3140
@Output() onSuccess: any;
3241
@Output() onError: any;

0 commit comments

Comments
 (0)