ngx-obelisco-example
Version:
Componentes funcionales y reutilizables para Angular.
33 lines • 7.37 kB
JavaScript
import { Component, Input, ContentChild } from '@angular/core';
import { OCustomContentDirective } from 'ngx-obelisco-example/directives';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "./o-banner-actions/o-banner-actions.component";
import * as i3 from "./o-banner-text/o-banner-text.component";
export class OBannerComponent {
constructor() {
this.isDark = false;
this.customClasses = '';
}
}
OBannerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OBannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
OBannerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: OBannerComponent, selector: "o-banner", inputs: { isDark: "isDark", content: "content", icon: "icon", customClasses: "customClasses" }, queries: [{ propertyName: "children", first: true, predicate: ["children"], descendants: true, static: true }, { propertyName: "oCustomContent", first: true, predicate: OCustomContentDirective, descendants: true, static: true }], ngImport: i0, template: "<div class=\"banner\" [class.banner-dark]=\"isDark\" [ngClass]=\"customClasses\">\r\n <div class=\"banner-content\" *ngIf=\"!oCustomContent\">\r\n <ng-content select=\"o-banner-icon\"></ng-content>\r\n <i *ngIf=\"icon && icon?.includes('bx')\" class=\"{{ icon }}\"></i>\r\n <span *ngIf=\"icon && !icon.includes('bx')\" class=\"material-icons-round\" aria-hidden=\"true\">{{ icon }}</span>\r\n\r\n <ng-content select=\"o-banner-text\"></ng-content>\r\n <o-banner-text *ngIf=\"content\" [text]=\"content\"></o-banner-text>\r\n\r\n <ng-content select=\"o-banner-actions\"></ng-content>\r\n <o-banner-actions *ngIf=\"children\"><ng-content></ng-content></o-banner-actions>\r\n </div>\r\n <ng-container *ngIf=\"oCustomContent\" [ngTemplateOutlet]=\"oCustomContent.template\"> </ng-container>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.OBannerActionsComponent, selector: "o-banner-actions", inputs: ["customClasses"] }, { kind: "component", type: i3.OBannerTextComponent, selector: "o-banner-text", inputs: ["text", "customClasses"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: OBannerComponent, decorators: [{
type: Component,
args: [{ selector: 'o-banner', template: "<div class=\"banner\" [class.banner-dark]=\"isDark\" [ngClass]=\"customClasses\">\r\n <div class=\"banner-content\" *ngIf=\"!oCustomContent\">\r\n <ng-content select=\"o-banner-icon\"></ng-content>\r\n <i *ngIf=\"icon && icon?.includes('bx')\" class=\"{{ icon }}\"></i>\r\n <span *ngIf=\"icon && !icon.includes('bx')\" class=\"material-icons-round\" aria-hidden=\"true\">{{ icon }}</span>\r\n\r\n <ng-content select=\"o-banner-text\"></ng-content>\r\n <o-banner-text *ngIf=\"content\" [text]=\"content\"></o-banner-text>\r\n\r\n <ng-content select=\"o-banner-actions\"></ng-content>\r\n <o-banner-actions *ngIf=\"children\"><ng-content></ng-content></o-banner-actions>\r\n </div>\r\n <ng-container *ngIf=\"oCustomContent\" [ngTemplateOutlet]=\"oCustomContent.template\"> </ng-container>\r\n</div>\r\n" }]
}], ctorParameters: function () { return []; }, propDecorators: { isDark: [{
type: Input
}], content: [{
type: Input
}], icon: [{
type: Input
}], customClasses: [{
type: Input
}], children: [{
type: ContentChild,
args: ['children', { static: true }]
}], oCustomContent: [{
type: ContentChild,
args: [OCustomContentDirective, { static: true }]
}] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiby1iYW5uZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJ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