feat(mocule): add title bar for category/money

This commit is contained in:
2025-08-03 00:56:11 -03:00
parent a2561ec8fd
commit 85a366d998
4 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
:host p {
overflow: hidden;
}

View File

@@ -0,0 +1,18 @@
<my-wallet-title-bar>
<my-wallet-typography
[ellipsis]="true"
maxWidth="19rem"
color="var(--mw-gray-500)"
[letterSpacing]="categoryProps().letterSpacing"
[lineHeight]="categoryProps().lineHeight"
[size]="categoryProps().size"
slot="item-left"
>{{category()}}</my-wallet-typography>
<my-wallet-money-text
[amount]="amount()"
color="var(--mw-gray-500)"
[lineHeight]="amountProps().lineHeight"
[size]="amountProps().size"
slot="item-right"
/>
</my-wallet-title-bar>

View File

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TitleBarCategoryComponent } from './title-bar-category.component';
describe('TitleBarCategoryComponent', () => {
let component: TitleBarCategoryComponent;
let fixture: ComponentFixture<TitleBarCategoryComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [TitleBarCategoryComponent]
})
.compileComponents();
fixture = TestBed.createComponent(TitleBarCategoryComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,26 @@
import { Component, input } from '@angular/core';
import { TitleBarComponent } from './../../atoms/title-bar/title-bar.component'
import { MoneyTextComponent } from './../money-text/money-text.component';
import { TypographyComponent } from './../../atoms/typography/typography.component'
@Component({
selector: 'my-wallet-title-bar-category',
standalone: true,
imports: [TitleBarComponent, MoneyTextComponent, TypographyComponent],
templateUrl: './title-bar-category.component.html',
styleUrl: './title-bar-category.component.css'
})
export class TitleBarCategoryComponent {
amount = input(0);
category = input('');
categoryProps = input({
ellipsis: true,
letterSpacing: '0.5px',
lineHeight: null,
size: '1.6rem',
});
amountProps = input({
lineHeight: null,
size: '1.6rem',
});
}