feat: add form header component

This commit is contained in:
2025-12-14 20:57:40 -03:00
parent f53250dd3b
commit 58558b3fca
4 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
<legend>{{title()}}
@if(subtitle()) {
<span>{{subtitle()}}</span>
}
</legend>

View File

@@ -0,0 +1,13 @@
legend {
display: inline-block;
font-family: var(--secondaryFont);
font-size: 2rem;
text-align: center;
span {
clear: both;
display: block;
font-size: 1rem;
margin-bottom: 2rem;
margin-top: 1rem;
}
}

View File

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

View File

@@ -0,0 +1,12 @@
import { Component, input } from '@angular/core';
@Component({
selector: 'app-form-header',
imports: [],
templateUrl: './form-header.html',
styleUrl: './form-header.scss',
})
export class FormHeader {
title = input('');
subtitle = input('');
}