diff --git a/projects/my-wallet-ds/src/lib/molecules/title-bar-date/title-bar-date.component.css b/projects/my-wallet-ds/src/lib/molecules/title-bar-date/title-bar-date.component.css new file mode 100644 index 0000000..5278d9d --- /dev/null +++ b/projects/my-wallet-ds/src/lib/molecules/title-bar-date/title-bar-date.component.css @@ -0,0 +1,9 @@ +.title-bar-date { + display: flex; +} + +.title-bar-date__day { + align-items: flex-end; + display: flex; + padding-left: 0.4rem; +} \ No newline at end of file diff --git a/projects/my-wallet-ds/src/lib/molecules/title-bar-date/title-bar-date.component.html b/projects/my-wallet-ds/src/lib/molecules/title-bar-date/title-bar-date.component.html new file mode 100644 index 0000000..e5e3a3f --- /dev/null +++ b/projects/my-wallet-ds/src/lib/molecules/title-bar-date/title-bar-date.component.html @@ -0,0 +1,20 @@ + + + + {{date()|date:'d'}} + + + {{date()|date:'EEEE'}} + + + \ No newline at end of file diff --git a/projects/my-wallet-ds/src/lib/molecules/title-bar-date/title-bar-date.component.spec.ts b/projects/my-wallet-ds/src/lib/molecules/title-bar-date/title-bar-date.component.spec.ts new file mode 100644 index 0000000..7bd8893 --- /dev/null +++ b/projects/my-wallet-ds/src/lib/molecules/title-bar-date/title-bar-date.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TitleBarDateComponent } from './title-bar-date.component'; + +describe('TitleBarDateComponent', () => { + let component: TitleBarDateComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [TitleBarDateComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(TitleBarDateComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/projects/my-wallet-ds/src/lib/molecules/title-bar-date/title-bar-date.component.ts b/projects/my-wallet-ds/src/lib/molecules/title-bar-date/title-bar-date.component.ts new file mode 100644 index 0000000..31f0d58 --- /dev/null +++ b/projects/my-wallet-ds/src/lib/molecules/title-bar-date/title-bar-date.component.ts @@ -0,0 +1,15 @@ +import { Component, input } from '@angular/core'; +import { TitleBarBaseMoneyComponent } from '../title-bar-base-money/title-bar-base-money.component'; + +import { DatePipe } from '@angular/common'; +import { TypographyComponent } from '../../atoms/typography/typography.component'; +@Component({ + selector: 'mw-title-bar-date', + standalone: true, + imports: [TitleBarBaseMoneyComponent, DatePipe, TypographyComponent], + templateUrl: './title-bar-date.component.html', + styleUrl: './title-bar-date.component.css' +}) +export class TitleBarDateComponent { + date = input(new Date()) +}