From 85a366d9985ef22a7065909e839fbb30a23dab1b Mon Sep 17 00:00:00 2001 From: Gabriel De Los Rios Date: Sun, 3 Aug 2025 00:56:11 -0300 Subject: [PATCH] feat(mocule): add title bar for category/money --- .../title-bar-category.component.css | 3 +++ .../title-bar-category.component.html | 18 +++++++++++++ .../title-bar-category.component.spec.ts | 23 ++++++++++++++++ .../title-bar-category.component.ts | 26 +++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.css create mode 100644 projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.html create mode 100644 projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.spec.ts create mode 100644 projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.ts diff --git a/projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.css b/projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.css new file mode 100644 index 0000000..a1e3d98 --- /dev/null +++ b/projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.css @@ -0,0 +1,3 @@ +:host p { + overflow: hidden; +} \ No newline at end of file diff --git a/projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.html b/projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.html new file mode 100644 index 0000000..19e2b8a --- /dev/null +++ b/projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.html @@ -0,0 +1,18 @@ + + {{category()}} + + \ No newline at end of file diff --git a/projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.spec.ts b/projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.spec.ts new file mode 100644 index 0000000..ec9af4a --- /dev/null +++ b/projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.spec.ts @@ -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; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [TitleBarCategoryComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(TitleBarCategoryComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.ts b/projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.ts new file mode 100644 index 0000000..9cc81da --- /dev/null +++ b/projects/my-wallet-ds/src/lib/molecules/title-bar-category/title-bar-category.component.ts @@ -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', + }); +}