Browse Source

feature(theme-shared): add new inputs and output to modal

pull/1577/head
mehmet-erim 7 years ago
parent
commit
b7a7a68aa6
  1. 7
      npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.html
  2. 10
      npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.ts

7
npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.html

@ -19,7 +19,12 @@
<span aria-hidden="true">&times;</span>
</button>
</div>
<div id="abp-modal-body" class="modal-body">
<div
id="abp-modal-body"
class="modal-body"
[style.height]="height || undefined"
[style.minHeight]="minHeight || undefined"
>
<ng-container *ngTemplateOutlet="abpBody"></ng-container>
<div id="abp-modal-footer" class="modal-footer">

10
npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.ts

@ -55,7 +55,7 @@ export class ModalComponent implements OnDestroy {
}
}
@Input() centered: boolean = true;
@Input() centered: boolean = false;
@Input() modalClass: string = '';
@ -63,6 +63,12 @@ export class ModalComponent implements OnDestroy {
@Output() visibleChange = new EventEmitter<boolean>();
@Input() height: number;
@Input() minHeight: number;
@Output() init = new EventEmitter<void>();
@ContentChild('abpHeader', { static: false }) abpHeader: TemplateRef<any>;
@ContentChild('abpBody', { static: false }) abpBody: TemplateRef<any>;
@ -139,6 +145,8 @@ export class ModalComponent implements OnDestroy {
filter(() => !!(this.closable && this.modalContent)),
)
.subscribe(() => this.close());
this.init.emit();
}
close() {

Loading…
Cancel
Save