primeng
Version:
[](https://opensource.org/licenses/MIT) [](https://badge.fury.io/js/primeng) [ • 3.02 kB
JavaScript
import { ElementRef, Input, ContentChild, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Header, Footer, SharedModule } from 'primeng/api';
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var Card = /** @class */ (function () {
function Card(el) {
this.el = el;
}
Card.prototype.getBlockableElement = function () {
return this.el.nativeElement.children[0];
};
Card.ctorParameters = function () { return [
{ type: ElementRef }
]; };
__decorate([
Input()
], Card.prototype, "header", void 0);
__decorate([
Input()
], Card.prototype, "subheader", void 0);
__decorate([
Input()
], Card.prototype, "style", void 0);
__decorate([
Input()
], Card.prototype, "styleClass", void 0);
__decorate([
ContentChild(Header)
], Card.prototype, "headerFacet", void 0);
__decorate([
ContentChild(Footer)
], Card.prototype, "footerFacet", void 0);
Card = __decorate([
Component({
selector: 'p-card',
template: "\n <div [ngClass]=\"'ui-card ui-widget ui-widget-content ui-corner-all'\" [ngStyle]=\"style\" [class]=\"styleClass\">\n <div class=\"ui-card-header\" *ngIf=\"headerFacet\">\n <ng-content select=\"p-header\"></ng-content>\n </div>\n <div class=\"ui-card-body\">\n <div class=\"ui-card-title\" *ngIf=\"header\">{{header}}</div>\n <div class=\"ui-card-subtitle\" *ngIf=\"subheader\">{{subheader}}</div>\n <div class=\"ui-card-content\">\n <ng-content></ng-content>\n </div>\n <div class=\"ui-card-footer\" *ngIf=\"footerFacet\">\n <ng-content select=\"p-footer\"></ng-content>\n </div>\n </div>\n </div>\n ",
changeDetection: ChangeDetectionStrategy.Default
})
], Card);
return Card;
}());
var CardModule = /** @class */ (function () {
function CardModule() {
}
CardModule = __decorate([
NgModule({
imports: [CommonModule],
exports: [Card, SharedModule],
declarations: [Card]
})
], CardModule);
return CardModule;
}());
/**
* Generated bundle index. Do not edit.
*/
export { Card, CardModule };
//# sourceMappingURL=primeng-card.js.map