feat: add base class for settings listing
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
<app-simple-list-w-actions [items]="(data$|async) ?? []" (action)="edit($event)"/>
|
||||||
|
<app-floating-big-btn icon="add" (bigClick)="add()"/>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
:host {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import { Observable } from 'rxjs';
|
||||||
|
import { SimpleListItem } from '../simple-list-w-actions/SimpleListItem';
|
||||||
|
|
||||||
|
export abstract class SettingsBaseList {
|
||||||
|
abstract data$: Observable<SimpleListItem[]>;
|
||||||
|
|
||||||
|
protected abstract edit(action: { action: string; subject: string }): void;
|
||||||
|
protected abstract add(): void;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user