Skip to content

Commit b12f3d4

Browse files
committed
modal header and footer components added
1 parent 6f2e81e commit b12f3d4

File tree

4 files changed

+75
-0
lines changed

4 files changed

+75
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class="modal-footer justify-content-between">
2+
<button
3+
type="button"
4+
class="btn btn-default"
5+
[disabled]="cancelDisabled"
6+
(click)="onCancelClick.emit()"
7+
>
8+
{{ cancelLabel }}
9+
</button>
10+
<button type="submit" class="btn btn-primary" [disabled]="saveDisabled">
11+
{{ saveLabel }}
12+
</button>
13+
</div>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import {
2+
Component,
3+
Input,
4+
Output,
5+
EventEmitter,
6+
ChangeDetectionStrategy,
7+
Injector
8+
} from '@angular/core';
9+
import { AppComponentBase } from '@shared/app-component-base';
10+
11+
@Component({
12+
selector: 'abp-modal-footer',
13+
templateUrl: './abp-modal-footer.component.html',
14+
changeDetection: ChangeDetectionStrategy.OnPush
15+
})
16+
export class AbpModalFooterComponent extends AppComponentBase {
17+
@Input() cancelLabel = this.l('Cancel');
18+
@Input() cancelDisabled: boolean;
19+
@Input() saveLabel = this.l('Save');
20+
@Input() saveDisabled: boolean;
21+
22+
@Output() onCancelClick = new EventEmitter<number>();
23+
24+
constructor(injector: Injector) {
25+
super(injector);
26+
}
27+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<div class="modal-header">
2+
<h4 class="modal-title">{{ title }}</h4>
3+
<button
4+
type="button"
5+
class="close"
6+
aria-label="Close"
7+
(click)="onCloseClick.emit()"
8+
>
9+
<span aria-hidden="true">&times;</span>
10+
</button>
11+
</div>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import {
2+
Component,
3+
Input,
4+
Output,
5+
EventEmitter,
6+
ChangeDetectionStrategy,
7+
Injector
8+
} from '@angular/core';
9+
import { AppComponentBase } from '@shared/app-component-base';
10+
11+
@Component({
12+
selector: 'abp-modal-header',
13+
templateUrl: './abp-modal-header.component.html',
14+
changeDetection: ChangeDetectionStrategy.OnPush
15+
})
16+
export class AbpModalHeaderComponent extends AppComponentBase {
17+
@Input() title: string;
18+
19+
@Output() onCloseClick = new EventEmitter<number>();
20+
21+
constructor(injector: Injector) {
22+
super(injector);
23+
}
24+
}

0 commit comments

Comments
 (0)