From b2a3acea0d0f66028c9ce5fad02d4ecc64abf70c Mon Sep 17 00:00:00 2001 From: Israel Lavi Date: Tue, 7 Aug 2018 10:54:17 +0300 Subject: Initial commit. Adding files needed for Linux Foundation. Change-Id: I9f2b4851a5ae01f83800c7f8bab8608a2221c730 Issue-ID: SDC-1608 Signed-off-by: Israel Lavi --- src/angular/modals/modal-close-button.component.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/angular/modals/modal-close-button.component.ts') diff --git a/src/angular/modals/modal-close-button.component.ts b/src/angular/modals/modal-close-button.component.ts index e761019..357ff72 100644 --- a/src/angular/modals/modal-close-button.component.ts +++ b/src/angular/modals/modal-close-button.component.ts @@ -1,7 +1,8 @@ -import { Component, Input } from "@angular/core"; -import { ButtonComponent } from "../buttons/button.component"; +import { Component, ComponentRef, Input } from "@angular/core"; import { ModalService } from "./modal.service"; import { RippleAnimationAction } from "../animations/ripple-click.animation.directive"; +import { ModalComponent } from "./modal.component"; +import { ButtonComponent } from "../buttons/button.component"; @Component({ selector: "sdc-modal-close-button", @@ -17,18 +18,20 @@ import { RippleAnimationAction } from "../animations/ripple-click.animation.dire ` }) -export class ModalCloseButtonComponent { +export class ModalCloseButtonComponent extends ButtonComponent { @Input() testId: string; @Input() disabled: boolean; + @Input() modalInstanceRef: ComponentRef; public rippleAnimationAction: RippleAnimationAction = RippleAnimationAction.MOUSE_ENTER; constructor(private modalService: ModalService) { + super(); } public closeModal = (): void => { - this.modalService.closeModal(); + this.modalInstanceRef.instance.closeModal(); } } -- cgit