diff --git a/src/app/components/icon-action-list/IconActionListItem.ts b/src/app/components/icon-action-list/IconActionListItem.ts new file mode 100644 index 0000000..911d29b --- /dev/null +++ b/src/app/components/icon-action-list/IconActionListItem.ts @@ -0,0 +1,3 @@ +export class IconActionListItem { + constructor(public iconSrc: string, public label = '', public value: string){} +} \ No newline at end of file diff --git a/src/app/components/icon-action-list/icon-action-list.html b/src/app/components/icon-action-list/icon-action-list.html new file mode 100644 index 0000000..2f3b78a --- /dev/null +++ b/src/app/components/icon-action-list/icon-action-list.html @@ -0,0 +1,8 @@ + + @for (item of items(); track item.value) { + + } + diff --git a/src/app/components/icon-action-list/icon-action-list.scss b/src/app/components/icon-action-list/icon-action-list.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/icon-action-list/icon-action-list.spec.ts b/src/app/components/icon-action-list/icon-action-list.spec.ts new file mode 100644 index 0000000..ed2b481 --- /dev/null +++ b/src/app/components/icon-action-list/icon-action-list.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { IconActionList } from './icon-action-list'; + +describe('IconActionList', () => { + let component: IconActionList; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [IconActionList] + }) + .compileComponents(); + + fixture = TestBed.createComponent(IconActionList); + component = fixture.componentInstance; + await fixture.whenStable(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/icon-action-list/icon-action-list.ts b/src/app/components/icon-action-list/icon-action-list.ts new file mode 100644 index 0000000..17b3895 --- /dev/null +++ b/src/app/components/icon-action-list/icon-action-list.ts @@ -0,0 +1,16 @@ +import { Component, input, output } from '@angular/core'; +import { MatListModule } from '@angular/material/list'; +import { IconActionListItem } from './IconActionListItem'; +import { TranslatePipe } from '@ngx-translate/core'; +import { TitleCasePipe } from '@angular/common'; + +@Component({ + selector: 'app-icon-action-list', + imports: [MatListModule, TranslatePipe, TitleCasePipe], + templateUrl: './icon-action-list.html', + styleUrl: './icon-action-list.scss', +}) +export class IconActionList { + readonly items = input([]); + readonly action = output(); +} diff --git a/src/app/components/icon-nav-list/IconNavListItem.ts b/src/app/components/icon-nav-list/IconNavListItem.ts new file mode 100644 index 0000000..c761849 --- /dev/null +++ b/src/app/components/icon-nav-list/IconNavListItem.ts @@ -0,0 +1,3 @@ +export class IconNavListItem { + constructor(public icon = 'thumb_up' , public label = '', public routerLink: string|string[] = ['/']){} +} \ No newline at end of file diff --git a/src/app/components/icon-nav-list/icon-nav-list.html b/src/app/components/icon-nav-list/icon-nav-list.html new file mode 100644 index 0000000..e2f131c --- /dev/null +++ b/src/app/components/icon-nav-list/icon-nav-list.html @@ -0,0 +1,8 @@ + + @for (item of items(); track item.label) { + + {{item.icon}} + {{item.label|translate|titlecase }} + + } + \ No newline at end of file diff --git a/src/app/components/icon-nav-list/icon-nav-list.scss b/src/app/components/icon-nav-list/icon-nav-list.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/components/icon-nav-list/icon-nav-list.spec.ts b/src/app/components/icon-nav-list/icon-nav-list.spec.ts new file mode 100644 index 0000000..1f7ad40 --- /dev/null +++ b/src/app/components/icon-nav-list/icon-nav-list.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { IconNavList } from './icon-nav-list'; + +describe('IconNavList', () => { + let component: IconNavList; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [IconNavList] + }) + .compileComponents(); + + fixture = TestBed.createComponent(IconNavList); + component = fixture.componentInstance; + await fixture.whenStable(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/icon-nav-list/icon-nav-list.ts b/src/app/components/icon-nav-list/icon-nav-list.ts new file mode 100644 index 0000000..2398dc9 --- /dev/null +++ b/src/app/components/icon-nav-list/icon-nav-list.ts @@ -0,0 +1,17 @@ +import { Component, input } from '@angular/core'; +import { MatIcon } from '@angular/material/icon'; +import { MatListModule } from '@angular/material/list'; +import { RouterLink } from '@angular/router'; +import { IconNavListItem } from './IconNavListItem'; +import { TranslatePipe } from '@ngx-translate/core'; +import { TitleCasePipe } from '@angular/common'; + +@Component({ + selector: 'app-icon-nav-list', + imports: [MatListModule, MatIcon, RouterLink, TranslatePipe, TitleCasePipe], + templateUrl: './icon-nav-list.html', + styleUrl: './icon-nav-list.scss', +}) +export class IconNavList { + readonly items = input([]); +}