Renamed many components + started implementing lazy loading
This commit is contained in:
1 parent
c8578ccf77
commit
60b517500f
80 files changed
+274
-242
No files matched your search
+16
@@ -0,0 +1,16 @@
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
.notification {
|
||||
position: fixed;
|
||||
right: 20px;
|
||||
bottom: 20px;
|
||||
z-index: 1050; /* Ensure it's above other content */
|
||||
margin-bottom: 20px; /* Adjust based on size and desired spacing */
|
||||
animation: fadeIn 1s ease-out; /* Use the fadeIn animation, lasts 1 second */
|
||||
}
|
||||
.notif-back {
|
||||
background-color: aliceblue;
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
<div class="notification">
|
||||
<div class="alert alert-border-success alert-dismissible fade show notif-back">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="font-35 text-success"><span class="material-icons-outlined fs-2">check_circle</span>
|
||||
</div>
|
||||
<div class="ms-3">
|
||||
<h6 class="mb-0 text-success">{{title}}</h6>
|
||||
<div class="">{{message}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn-close"></button>
|
||||
</div>
|
||||
</div>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { NotificationPopupComponent } from './notification-popup.component';
|
||||
|
||||
describe('NotificationPopupComponent', () => {
|
||||
let component: NotificationPopupComponent;
|
||||
let fixture: ComponentFixture<NotificationPopupComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [NotificationPopupComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(NotificationPopupComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,30 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-notification-popup',
|
||||
templateUrl: './notification-popup.component.html',
|
||||
styleUrls: ['./notification-popup.component.css'],
|
||||
})
|
||||
export class NotificationPopupComponent {
|
||||
show: boolean = false;
|
||||
title: string = 'Alert';
|
||||
message: string = 'Alert Message...';
|
||||
type: string = 'alert';
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
public showNotification(
|
||||
title: string,
|
||||
message: string,
|
||||
type: string = 'alert',
|
||||
timeout: number = 3000
|
||||
): void {
|
||||
this.title = title;
|
||||
this.message = message;
|
||||
this.type = type;
|
||||
this.show = true;
|
||||
setTimeout(() => (this.show = false), timeout);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user