ngx-bootstrap
Version:
Angular Bootstrap
55 lines • 1.96 kB
JavaScript
import { ChangeDetectionStrategy, Input, Component } from '@angular/core';
import { PopoverConfig } from './popover.config';
import { isBs3 } from 'ngx-bootstrap/utils';
export class PopoverContainerComponent {
constructor(config) {
Object.assign(this, config);
}
get isBs3() {
return isBs3();
}
}
PopoverContainerComponent.decorators = [
{ type: Component, args: [{
selector: 'popover-container',
changeDetection: ChangeDetectionStrategy.OnPush,
// eslint-disable-next-line @angular-eslint/no-host-metadata-property
host: {
'[attr.id]': 'popoverId',
'[class]': '"popover in popover-" + placement + " " + "bs-popover-" + placement + " " + placement + " " + containerClass',
'[class.show]': '!isBs3',
'[class.bs3]': 'isBs3',
role: 'tooltip',
style: 'display:block;'
},
template: "<div class=\"popover-arrow arrow\"></div>\n<h3 class=\"popover-title popover-header\" *ngIf=\"title\">{{ title }}</h3>\n<div class=\"popover-content popover-body\">\n <ng-content></ng-content>\n</div>\n",
styles: [`
:host.bs3.popover-top {
margin-bottom: 10px;
}
:host.bs3.popover.top>.arrow {
margin-left: -2px;
}
:host.bs3.popover.top {
margin-bottom: 10px;
}
:host.popover.bottom>.arrow {
margin-left: -4px;
}
:host.bs3.bs-popover-left {
margin-right: .5rem;
}
:host.bs3.bs-popover-right .arrow, :host.bs3.bs-popover-left .arrow{
margin: .3rem 0;
}
`]
},] }
];
PopoverContainerComponent.ctorParameters = () => [
{ type: PopoverConfig }
];
PopoverContainerComponent.propDecorators = {
placement: [{ type: Input }],
title: [{ type: Input }]
};
//# sourceMappingURL=popover-container.component.js.map