feat: add new basis for money title bar components
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
<my-wallet-title-bar>
|
||||||
|
<ng-content slot="item-left"></ng-content>
|
||||||
|
<mw-money-text
|
||||||
|
[amount]="amount()"
|
||||||
|
color="var(--mw-gray-500)"
|
||||||
|
[lineHeight]="amountProps().lineHeight"
|
||||||
|
[size]="amountProps().size"
|
||||||
|
slot="item-right"
|
||||||
|
/>
|
||||||
|
</my-wallet-title-bar>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { TitleBarBaseMoneyComponent } from './title-bar-base-money.component';
|
||||||
|
|
||||||
|
describe('TitleBarBaseMoneyComponent', () => {
|
||||||
|
let component: TitleBarBaseMoneyComponent;
|
||||||
|
let fixture: ComponentFixture<TitleBarBaseMoneyComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
imports: [TitleBarBaseMoneyComponent]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(TitleBarBaseMoneyComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import { Component, input } from '@angular/core';
|
||||||
|
import { MoneyTextComponent } from './../money-text/money-text.component';
|
||||||
|
import { TitleBarComponent } from './../../atoms/title-bar/title-bar.component';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'mw-title-bar-base-money',
|
||||||
|
standalone: true,
|
||||||
|
imports: [MoneyTextComponent, TitleBarComponent],
|
||||||
|
templateUrl: './title-bar-base-money.component.html',
|
||||||
|
styleUrl: './title-bar-base-money.component.css'
|
||||||
|
})
|
||||||
|
export class TitleBarBaseMoneyComponent {
|
||||||
|
amount = input(0);
|
||||||
|
amountProps = input({
|
||||||
|
lineHeight: null,
|
||||||
|
size: '1.6rem',
|
||||||
|
});
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user