feat: date title bar
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
.title-bar-date {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-bar-date__day {
|
||||||
|
align-items: flex-end;
|
||||||
|
display: flex;
|
||||||
|
padding-left: 0.4rem;
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<mw-title-bar-base-money [amount]="15000">
|
||||||
|
<div class="title-bar-date">
|
||||||
|
<div>
|
||||||
|
<mw-typography
|
||||||
|
size="1.6rem"
|
||||||
|
lineHeight="1.6rem"
|
||||||
|
color="var(--mw-gray-500)"
|
||||||
|
weight="bold"
|
||||||
|
>{{date()|date:'d'}}</mw-typography>
|
||||||
|
</div>
|
||||||
|
<div class="title-bar-date__day">
|
||||||
|
<mw-typography
|
||||||
|
lineHeight="1.4rem"
|
||||||
|
size="1.1rem"
|
||||||
|
color="var(--mw-gray-500)"
|
||||||
|
weight="bold"
|
||||||
|
>{{date()|date:'EEEE'}}</mw-typography>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mw-title-bar-base-money>
|
||||||
@@ -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<TitleBarDateComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
imports: [TitleBarDateComponent]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(TitleBarDateComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -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())
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user