Merge pull request #434 from jdegand/interop-placeholder

fix: change placeholder text
This commit is contained in:
Laforge Thomas
2023-12-22 08:54:25 +01:00
committed by GitHub

View File

@@ -25,7 +25,7 @@ import { PhotoStore } from './photos.store';
RouterLinkWithHref, RouterLinkWithHref,
], ],
template: ` template: `
<h2 class="text-xl mb-2">Photos</h2> <h2 class="mb-2 text-xl">Photos</h2>
<mat-form-field appearance="fill"> <mat-form-field appearance="fill">
<mat-label>Search</mat-label> <mat-label>Search</mat-label>
@@ -33,23 +33,23 @@ import { PhotoStore } from './photos.store';
type="text" type="text"
matInput matInput
[formControl]="search" [formControl]="search"
placeholder="write an article" /> placeholder="find a photo" />
</mat-form-field> </mat-form-field>
<ng-container *ngrxLet="vm$ as vm"> <ng-container *ngrxLet="vm$ as vm">
<section class="flex flex-col"> <section class="flex flex-col">
<section class="flex gap-3 items-center"> <section class="flex items-center gap-3">
<button <button
[disabled]="vm.page === 1" [disabled]="vm.page === 1"
[class.bg-gray-400]="vm.page === 1" [class.bg-gray-400]="vm.page === 1"
class="text-xl border rounded-md p-3" class="rounded-md border p-3 text-xl"
(click)="store.previousPage()"> (click)="store.previousPage()">
< <
</button> </button>
<button <button
[disabled]="vm.endOfPage" [disabled]="vm.endOfPage"
[class.bg-gray-400]="vm.endOfPage" [class.bg-gray-400]="vm.endOfPage"
class="text-xl border rounded-md p-3" class="rounded-md border p-3 text-xl"
(click)="store.nextPage()"> (click)="store.nextPage()">
> >
</button> </button>
@@ -93,7 +93,7 @@ export default class PhotosComponent implements OnInit {
this.search.setValue(search); this.search.setValue(search);
this.formInit = true; this.formInit = true;
} }
}) }),
); );
private formInit = false; private formInit = false;
@@ -104,8 +104,8 @@ export default class PhotosComponent implements OnInit {
this.search.valueChanges.pipe( this.search.valueChanges.pipe(
skipWhile(() => !this.formInit), skipWhile(() => !this.formInit),
debounceTime(300), debounceTime(300),
distinctUntilChanged() distinctUntilChanged(),
) ),
); );
} }