aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components/customModal/components/modalButton/modal-button.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/customModal/components/modalButton/modal-button.component.ts')
-rw-r--r--vid-webpack-master/src/app/shared/components/customModal/components/modalButton/modal-button.component.ts28
1 files changed, 28 insertions, 0 deletions
diff --git a/vid-webpack-master/src/app/shared/components/customModal/components/modalButton/modal-button.component.ts b/vid-webpack-master/src/app/shared/components/customModal/components/modalButton/modal-button.component.ts
new file mode 100644
index 000000000..d93c67851
--- /dev/null
+++ b/vid-webpack-master/src/app/shared/components/customModal/components/modalButton/modal-button.component.ts
@@ -0,0 +1,28 @@
+import {Component, EventEmitter, HostListener, Input, Output} from "@angular/core";
+import {CustomButtonComponent} from "../../../customButton/custom-button.component";
+
+@Component({
+ selector: "custom-modal-button",
+ templateUrl: './modal-button.component.html',
+ styleUrls: ['./modal-button.component.scss']
+})
+export class CustomModalButtonComponent extends CustomButtonComponent {
+
+ @Input() public id?: string;
+ @Input() public callback: Function;
+ @Input() public closeModal: boolean;
+ @Output() closeModalEvent: EventEmitter<any> = new EventEmitter<any>();
+ @HostListener('click') invokeCallback = (): void => {
+ if (this.callback) {
+ this.callback();
+ }
+ if (this.closeModal) {
+ this.closeModalEvent.emit();
+ }
+ }
+
+ constructor() {
+ super();
+ this.closeModal = false;
+ }
+}