Updated themed component.

This commit is contained in:
Michael Spalti
2023-01-21 04:00:46 -08:00
parent 6e052af1f0
commit 4f476adbc1
2 changed files with 13 additions and 5 deletions

View File

@@ -3,8 +3,8 @@
<ng-container *ngComponentOutlet="getStartsWithComponent(); injector: objectInjector;"></ng-container>
<div *ngIf="objects?.hasSucceeded && !objects?.isLoading && objects?.payload?.page.length > 0" @fadeIn>
<div *ngIf="shouldDisplayResetButton$ |async" class="mb-2 reset">
<ds-results-back-button [paginationConfig]="paginationConfig"
[previousPage$]="previousPage$"></ds-results-back-button>
<ds-themed-results-back-button [paginationConfig]="paginationConfig"
[previousPage$]="previousPage$"></ds-themed-results-back-button>
</div>
<ds-viewable-collection
[config]="paginationConfig"
@@ -19,8 +19,8 @@
<ds-error *ngIf="objects?.hasFailed" message="{{'error.browse-by' | translate}}"></ds-error>
<div *ngIf="!objects?.isLoading && objects?.payload?.page.length === 0">
<div *ngIf="shouldDisplayResetButton$ |async" class="d-inline-block mb-4 reset">
<ds-results-back-button [paginationConfig]="paginationConfig"
[previousPage$]="previousPage$"></ds-results-back-button>
<ds-themed-results-back-button [paginationConfig]="paginationConfig"
[previousPage$]="previousPage$"></ds-themed-results-back-button>
</div>
<div class="alert alert-info w-100" role="alert">
{{'browse.empty' | translate}}

View File

@@ -1,6 +1,8 @@
import { Component } from '@angular/core';
import { Component, Input } from '@angular/core';
import { ThemedComponent } from '../theme-support/themed.component';
import { ResultsBackButtonComponent } from './results-back-button.component';
import { BehaviorSubject } from 'rxjs';
import { PaginationComponentOptions } from '../pagination/pagination-component-options.model';
@Component({
selector: 'ds-themed-results-back-button',
@@ -9,6 +11,12 @@ import { ResultsBackButtonComponent } from './results-back-button.component';
})
export class ThemedResultsBackButtonComponent extends ThemedComponent<ResultsBackButtonComponent> {
@Input() previousPage$?: BehaviorSubject<string>;
@Input() paginationConfig?: PaginationComponentOptions;
protected inAndOutputNames: (keyof ResultsBackButtonComponent & keyof this)[] = ['previousPage$', 'paginationConfig'];
protected getComponentName(): string {
return 'ResultsBackButtonComponent';
}