From bd48ea25b7aae49352b9525a4959795860155cfc Mon Sep 17 00:00:00 2001 From: Gabriel De Los Rios Date: Wed, 10 Dec 2025 21:46:48 -0300 Subject: [PATCH] feat: add squared btn component --- .../components/squared-btn/squared-btn.html | 3 +++ .../components/squared-btn/squared-btn.scss | 16 +++++++++++++ .../squared-btn/squared-btn.spec.ts | 23 +++++++++++++++++++ src/app/components/squared-btn/squared-btn.ts | 11 +++++++++ 4 files changed, 53 insertions(+) create mode 100644 src/app/components/squared-btn/squared-btn.html create mode 100644 src/app/components/squared-btn/squared-btn.scss create mode 100644 src/app/components/squared-btn/squared-btn.spec.ts create mode 100644 src/app/components/squared-btn/squared-btn.ts diff --git a/src/app/components/squared-btn/squared-btn.html b/src/app/components/squared-btn/squared-btn.html new file mode 100644 index 0000000..2d81bd3 --- /dev/null +++ b/src/app/components/squared-btn/squared-btn.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/app/components/squared-btn/squared-btn.scss b/src/app/components/squared-btn/squared-btn.scss new file mode 100644 index 0000000..16b884a --- /dev/null +++ b/src/app/components/squared-btn/squared-btn.scss @@ -0,0 +1,16 @@ +.squared-btn { + background-color: var(--primary); + border: none; + color: white; + font-size: 1.2rem; + padding: 1rem 4rem; + text-transform: uppercase; + transition: background-color 0.5s ease-in-out; + width: 100%; + + &:hover { + background-color: var(--primaryDark); + cursor: pointer; + } + +} diff --git a/src/app/components/squared-btn/squared-btn.spec.ts b/src/app/components/squared-btn/squared-btn.spec.ts new file mode 100644 index 0000000..5887cf3 --- /dev/null +++ b/src/app/components/squared-btn/squared-btn.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SquaredBtn } from './squared-btn'; + +describe('SquaredBtn', () => { + let component: SquaredBtn; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [SquaredBtn] + }) + .compileComponents(); + + fixture = TestBed.createComponent(SquaredBtn); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/squared-btn/squared-btn.ts b/src/app/components/squared-btn/squared-btn.ts new file mode 100644 index 0000000..ce498b0 --- /dev/null +++ b/src/app/components/squared-btn/squared-btn.ts @@ -0,0 +1,11 @@ +import { Component, input } from '@angular/core'; + +@Component({ + selector: 'app-squared-btn', + imports: [], + templateUrl: './squared-btn.html', + styleUrl: './squared-btn.scss', +}) +export class SquaredBtn { + text = input(''); +}