UNPKG

ng2-bootstrap-card

Version:

Angular 2 Bootstrap card component

70 lines 3.03 kB
"use strict"; 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 __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = require("@angular/core"); var CardComponent = (function () { function CardComponent() { this.className = ''; this.header = ''; this.footer = ''; this.paddingLeft = '0px'; this.paddingRight = '0px'; this.color = '#000000'; this.backgroundColor = '#ffffff'; } CardComponent.prototype.getCardBlockStyles = function () { return { 'color': this.color, 'background-color': this.backgroundColor }; }; return CardComponent; }()); __decorate([ core_1.Input(), __metadata("design:type", String) ], CardComponent.prototype, "className", void 0); __decorate([ core_1.Input(), __metadata("design:type", String) ], CardComponent.prototype, "header", void 0); __decorate([ core_1.Input(), __metadata("design:type", String) ], CardComponent.prototype, "footer", void 0); __decorate([ core_1.Input(), __metadata("design:type", String) ], CardComponent.prototype, "title", void 0); __decorate([ core_1.Input(), __metadata("design:type", Object) ], CardComponent.prototype, "paddingLeft", void 0); __decorate([ core_1.Input(), __metadata("design:type", Object) ], CardComponent.prototype, "paddingRight", void 0); __decorate([ core_1.Input(), __metadata("design:type", Object) ], CardComponent.prototype, "color", void 0); __decorate([ core_1.Input(), __metadata("design:type", Object) ], CardComponent.prototype, "backgroundColor", void 0); CardComponent = __decorate([ core_1.Component({ selector: 'card', template: "\n <div class=\"{{className}}\" [style.paddingLeft]=\"paddingLeft\" [style.paddingRight]=\"paddingRight\">\n <div class=\"card\">\n <div class=\"card-header\">{{header}}</div>\n <div class=\"card-block\" [ngStyle]=\"getCardBlockStyles()\">\n <h4 *ngIf=\"title\" class=\"card-title\">\n {{title}}\n </h4>\n <ng-content></ng-content>\n </div>\n <div class=\"card-footer\">{{footer}}</div>\n </div>\n </div>\n " }), __metadata("design:paramtypes", []) ], CardComponent); exports.CardComponent = CardComponent; //# sourceMappingURL=card.component.js.map