feat: action bar for contacts in contact list table

This commit is contained in:
2025-12-14 20:34:26 -03:00
parent a12f66e594
commit 87d7557cf3
4 changed files with 63 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
<div>
<a class="btn btn--edit" (click)="editContact.emit()">
<i class="fas fa-pen-square"></i></a>
<button class="btn btn--delete" type="button" (click)="deleteContact.emit()">
<i class="fas fa-trash-alt"></i>
</button>
</div>

View File

@@ -0,0 +1,21 @@
button {
background-color: transparent;
border: none;
}
.btn {
font-size: 2rem;
text-decoration: none;
&:hover {
cursor: pointer;
}
&--edit {
margin-right: 4.44995px;
color: var(--secondary);
}
&--delete {
color: var(--primary);
}
}

View File

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

View File

@@ -0,0 +1,12 @@
import { Component, output } from '@angular/core';
@Component({
selector: 'app-contact-actions-bar',
imports: [],
templateUrl: './contact-actions-bar.html',
styleUrl: './contact-actions-bar.scss',
})
export class ContactActionsBar {
deleteContact = output();
editContact = output();
}