change icon from tables
This commit is contained in:
35
src/app/components/modal-icon/modal-icon.ts
Normal file
35
src/app/components/modal-icon/modal-icon.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import {Component, input} from '@angular/core';
|
||||
import {NzModalComponent} from "ng-zorro-antd/modal";
|
||||
import {NzIconDirective} from "ng-zorro-antd/icon";
|
||||
|
||||
@Component({
|
||||
selector: 'app-modal-icon',
|
||||
imports: [
|
||||
NzModalComponent,
|
||||
NzIconDirective
|
||||
],
|
||||
templateUrl: './modal-icon.html',
|
||||
styleUrl: './modal-icon.css',
|
||||
})
|
||||
export class ModalIcon {
|
||||
icon = input.required<string>()
|
||||
name = input.required<string>();
|
||||
isVisible = false;
|
||||
isOkLoading = false;
|
||||
|
||||
showModal(): void {
|
||||
this.isVisible = true;
|
||||
}
|
||||
|
||||
handleOk(): void {
|
||||
this.isOkLoading = true;
|
||||
setTimeout(() => {
|
||||
this.isVisible = false;
|
||||
this.isOkLoading = false;
|
||||
}, 1000); // 1 secondes
|
||||
}
|
||||
|
||||
handleCancel(): void {
|
||||
this.isVisible = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user