feat: action bar for contacts in contact list table
This commit is contained in:
@@ -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>
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -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();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user