UNPKG

@angular-material-extensions/jumbotron

Version:

Angular UI open source library built with material design in order to illustrate a highlighted/important information for the user

103 lines (95 loc) 3.4 kB
import { CommonModule } from '@angular/common'; import { Component, ViewChild, TemplateRef, ViewEncapsulation, ContentChild, Input, NgModule } from '@angular/core'; import { MatCardModule } from '@angular/material'; import { FlexLayoutModule } from '@angular/flex-layout'; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class MatJumbotronContentComponent { constructor() { } /** * @return {?} */ ngOnInit() { } } MatJumbotronContentComponent.decorators = [ { type: Component, args: [{ selector: 'mat-jumbotron-content', template: ` <ng-template> <ng-content></ng-content> </ng-template> `, styles: [` :host{display:block} `] },] }, ]; /** @nocollapse */ MatJumbotronContentComponent.ctorParameters = () => []; MatJumbotronContentComponent.propDecorators = { content: [{ type: ViewChild, args: [TemplateRef, { static: false },] }] }; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class MatJumbotronComponent { constructor() { } } MatJumbotronComponent.decorators = [ { type: Component, args: [{ selector: 'mat-jumbotron', template: ` <mat-card fxLayout="row" fxLayoutAlign="center center"> <mat-card-content fxLayout="row" fxFlex fxLayout.xs="column" fxLayoutGap="2rem" fxLayoutAlign="center center"> <!--main image--> <img *ngIf="imgURL" mat-card-xl-image [src]="imgURL"> <!--content--> <div fxLayout="column" [fxFlex]="imgURL ? 50 : 100"> <ng-container [ngTemplateOutlet]="jumbotronContent.content"></ng-container> </div> </mat-card-content> </mat-card> `, styles: [` :host{display:block}:host ::ng-deep mat-card{background:#e9ecef!important}:host ::ng-deep mat-card img{-o-object-fit:cover;object-fit:cover}:host ::ng-deep mat-card h1{font-weight:400!important}:host ::ng-deep mat-card p{margin-top:0;margin-bottom:1rem;font-size:1.4rem} `], encapsulation: ViewEncapsulation.Emulated },] }, ]; /** @nocollapse */ MatJumbotronComponent.ctorParameters = () => []; MatJumbotronComponent.propDecorators = { jumbotronContent: [{ type: ContentChild, args: [MatJumbotronContentComponent, { static: false },] }], imgURL: [{ type: Input }] }; /** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ class MatJumbotronModule { } MatJumbotronModule.decorators = [ { type: NgModule, args: [{ imports: [ CommonModule, FlexLayoutModule, MatCardModule, ], exports: [MatJumbotronComponent, MatJumbotronContentComponent], declarations: [MatJumbotronComponent, MatJumbotronContentComponent] },] }, ]; export { MatJumbotronComponent, MatJumbotronContentComponent, MatJumbotronModule }; //# sourceMappingURL=jumbotron.js.map