feat: add TextButtonComponent

This commit is contained in:
itsscb 2025-03-03 22:43:08 +01:00
parent cf6bb1abff
commit a6b021dd98
4 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,16 @@
button {
background-color: var(--primary-background-color);
color: var(--primary-text-color);
font-size: 1.5rem;
font-weight: bold;
padding: 1rem 3rem;
border: none;
border-color: var(--primary-background-color);
border-radius: 6px;
cursor: pointer;
}
button:hover {
transform: translateY(3px);
transition: transform 0.1s ease-in-out;
}

View File

@ -0,0 +1 @@
<button>{{ text }}</button>

View File

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

View File

@ -0,0 +1,12 @@
// import {Component} from '@angular/core';
import {Component, Input} from '@angular/core';
@Component({
selector: 'atomic-text-button',
imports: [],
templateUrl: './text-button.component.html',
styleUrl: './text-button.component.css'
})
export class TextButtonComponent {
@Input() text: string = '';
}