Sprint 8: add widget manifest and data source engine
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { SectionConfig } from '../../shared/models/config';
|
||||
import { FooterWidgetData } from '../contracts/widget-data.contract';
|
||||
|
||||
export interface FooterNavigationLink {
|
||||
id: string;
|
||||
@@ -15,7 +17,7 @@ export interface FooterNavigationLink {
|
||||
<footer class="footer-nav-widget">
|
||||
<nav>
|
||||
<ul>
|
||||
@for (link of links; track link.id) {
|
||||
@for (link of data?.links ?? []; track link.id) {
|
||||
<li>
|
||||
<button type="button" (click)="onLinkClick(link)">{{ link.label }}</button>
|
||||
</li>
|
||||
@@ -34,7 +36,8 @@ export interface FooterNavigationLink {
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class FooterNavigationWidgetComponent {
|
||||
@Input() links: FooterNavigationLink[] = [];
|
||||
@Input() section: SectionConfig | null = null;
|
||||
@Input() data: FooterWidgetData | null = null;
|
||||
|
||||
@Output() linkSelected = new EventEmitter<FooterNavigationLink>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user