app/@overflow/commons/ui/component/primeng/div.component.ts

25 lines
505 B
TypeScript
Raw Normal View History

2018-09-19 09:47:34 +00:00
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];
}
}