[Library | Trunk]: Fs modal add a boolean for each button

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60636 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2021-03-12 10:29:58 +00:00
parent 3e14245cc0
commit c9bc5dd980
1 changed files with 6 additions and 5 deletions

View File

@ -13,12 +13,12 @@ import {delay} from "rxjs/operators";
<div class="header">
<h6 *ngIf="title">{{title}}</h6>
</div>
<div class="content" [class.hasFooter]="buttons">
<div class="content" [class.hasFooter]="cancelButton || okButton">
<ng-content></ng-content>
</div>
<div *ngIf="buttons" class="footer uk-flex uk-flex-right">
<button class="uk-button uk-button-secondary outlined" [disabled]="cancelButtonDisabled" (click)="close()">{{cancelButtonText}}</button>
<button class="uk-button uk-button-secondary uk-margin-small-left" [disabled]="okButtonDisabled" (click)="ok()">{{okButtonText}}</button>
<div *ngIf="cancelButton || okButton" class="footer uk-flex uk-flex-right">
<button *ngIf="cancelButton" class="uk-button uk-button-secondary outlined" [disabled]="cancelButtonDisabled" (click)="close()">{{cancelButtonText}}</button>
<button *ngIf="okButton" class="uk-button uk-button-secondary uk-margin-small-left" [disabled]="okButtonDisabled" (click)="ok()">{{okButtonText}}</button>
</div>
</div>
</div>
@ -27,7 +27,8 @@ import {delay} from "rxjs/operators";
export class FullScreenModalComponent implements OnInit {
okButtonText = 'OK';
cancelButtonText = 'Cancel';
buttons: boolean = false;
cancelButton: boolean = false;
okButton: boolean = false;
title: string = null;
@Input()
okButtonDisabled = false;