-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add generic list component to render lists
- Loading branch information
Showing
9 changed files
with
101 additions
and
60 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/app/data-catalogue/components/data-display-section/data-display-section.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<ul class="list"> | ||
<li *ngFor="let item of listData" class="list__item"> | ||
<ng-container *ngTemplateOutlet="itemTemplate; context: {$implicit: item}"></ng-container> | ||
</li> | ||
</ul> |
11 changes: 11 additions & 0 deletions
11
src/app/shared/components/list/generic-list.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.list { | ||
margin: 0; | ||
padding: 0; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 12px; | ||
|
||
.list__item { | ||
list-style-type: none; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {Component, Input, TemplateRef} from '@angular/core'; | ||
import {NgForOf, NgTemplateOutlet} from '@angular/common'; | ||
|
||
@Component({ | ||
selector: 'generic-list', | ||
standalone: true, | ||
imports: [NgForOf, NgTemplateOutlet], | ||
templateUrl: './generic-list.component.html', | ||
styleUrl: './generic-list.component.scss', | ||
}) | ||
export class GenericListComponent { | ||
@Input() public listData: any[] = []; | ||
@Input() public itemTemplate: TemplateRef<any> | null = null; | ||
} |