Skip to content

Commit

Permalink
closes #39
Browse files Browse the repository at this point in the history
  • Loading branch information
seiyria committed May 8, 2024
1 parent 9b0b2b0 commit d6c8239
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/app/_shared/components/topbar/topbar.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<ion-toolbar color="primary">
@if(showBackButton()) {
<ion-buttons slot="start">
<ion-back-button defaultHref="/search"></ion-back-button>
</ion-buttons>
}

<ion-grid>
<ion-row>
<ion-col size-xs="10" size-sm="10" size-md="4" size-lg="6">

@if(title(); as titleText) {
<ion-title>
{{ titleText }}
Expand Down
2 changes: 2 additions & 0 deletions src/app/_shared/components/topbar/topbar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export class TopbarComponent {
public searchOnType = input<boolean>(false);
public searchOnEnter = input<boolean>(false);

public showBackButton = input<boolean>(false);

doType($event: string) {
if (!this.searchOnType()) return;
this.search($event);
Expand Down
2 changes: 1 addition & 1 deletion src/app/card/card.page.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ion-header>
<app-topbar [searchOnEnter]="true"></app-topbar>
<app-topbar [searchOnEnter]="true" [showBackButton]="true"></app-topbar>
</ion-header>

<ion-content>
Expand Down

0 comments on commit d6c8239

Please sign in to comment.