feat: add squared btn component
This commit is contained in:
3
src/app/components/squared-btn/squared-btn.html
Normal file
3
src/app/components/squared-btn/squared-btn.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<button class="squared-btn">
|
||||||
|
{{text()}}
|
||||||
|
</button>
|
||||||
16
src/app/components/squared-btn/squared-btn.scss
Normal file
16
src/app/components/squared-btn/squared-btn.scss
Normal file
@@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
23
src/app/components/squared-btn/squared-btn.spec.ts
Normal file
23
src/app/components/squared-btn/squared-btn.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { SquaredBtn } from './squared-btn';
|
||||||
|
|
||||||
|
describe('SquaredBtn', () => {
|
||||||
|
let component: SquaredBtn;
|
||||||
|
let fixture: ComponentFixture<SquaredBtn>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
imports: [SquaredBtn]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(SquaredBtn);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
11
src/app/components/squared-btn/squared-btn.ts
Normal file
11
src/app/components/squared-btn/squared-btn.ts
Normal file
@@ -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('');
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user