This commit is contained in:
crusader
2018-09-19 18:47:34 +09:00
parent 785c3eb5bc
commit a0b22cd1a4
7 changed files with 50 additions and 71 deletions

View File

@@ -3,6 +3,7 @@ import {
} from './menu';
import {
DivComponent,
DropdownPanelComponent,
PopupPanelComponent,
} from './primeng';
@@ -17,6 +18,7 @@ import {
} from './window';
export const COMPONENTS = [
DivComponent,
DropdownPanelComponent,
MenuBarComponent,
PopupPanelComponent,

View File

@@ -0,0 +1,24 @@
import {
Component, ElementRef, Input,
} from '@angular/core';
import { BlockableUI } from 'primeng/primeng';
@Component({
selector: 'of-p-div',
template: `
<div [ngStyle]="style" [class]="styleClass">
<ng-content></ng-content>
</div>
`,
})
export class DivComponent implements BlockableUI {
@Input() style: any;
@Input() styleClass: string;
constructor(private el: ElementRef) { }
getBlockableElement(): HTMLElement {
return this.el.nativeElement.children[0];
}
}

View File

@@ -1,2 +1,3 @@
export { DivComponent } from './div.component';
export { DropdownPanelComponent } from './dropdown-panel.component';
export { PopupPanelComponent } from './popup-panel.component';