UNPKG

@neeyamoui/my-component-lib

Version:

A reusable Angular component library with common UI elements like buttons.

51 lines (45 loc) 4.33 kB
import * as i0 from '@angular/core'; import { Component, EventEmitter, Output, Input } from '@angular/core'; import { CommonModule } from '@angular/common'; import * as i1 from '@angular/material/icon'; import { MatIconModule } from '@angular/material/icon'; class MyComponentLib { static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: MyComponentLib, deps: [], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", type: MyComponentLib, isStandalone: true, selector: "lib-my-component-lib", ngImport: i0, template: ` <p> my-component-lib works! </p> `, isInline: true, styles: [""] }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: MyComponentLib, decorators: [{ type: Component, args: [{ selector: 'lib-my-component-lib', imports: [], template: ` <p> my-component-lib works! </p> ` }] }] }); // projects/my-component-library/src/lib/my-button/my-button.ts class MyButton { backgroundColor = 'orange'; // Default blue onClick = new EventEmitter(); constructor() { } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: MyButton, deps: [], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", type: MyButton, isStandalone: true, selector: "lib-my-button", inputs: { backgroundColor: "backgroundColor" }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<div class=\"col s12 my-library_emptyFlex\">\r\n <mat-icon> no_sim</mat-icon>\r\n <div class=\"col s12 my-library_noDataText center\">\r\n <ng-content select=\".main-content\"></ng-content>\r\n </div>\r\n <div class=\"col s12 my-library_subNoData center\">\r\n <ng-content select=\".sub-content\"></ng-content>\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Rubik&display=swap\";.my-library-button{padding:10px 20px;border:none;border-radius:5px;color:#fff;cursor:pointer;font-size:16px;transition:background-color .3s ease}.my-library-button:hover{opacity:.9}.my-library_noDataText{font-family:rubik!important;color:#4d4d4d;font-size:16px}.my-library_subNoData{font-family:roboto;font-size:13px;color:#a6a6a6}.my-library_emptyFlex{display:flex;justify-content:center;align-items:center;flex-direction:column;flex-wrap:wrap;gap:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: MyButton, decorators: [{ type: Component, args: [{ selector: 'lib-my-button', standalone: true, imports: [CommonModule, MatIconModule], template: "<div class=\"col s12 my-library_emptyFlex\">\r\n <mat-icon> no_sim</mat-icon>\r\n <div class=\"col s12 my-library_noDataText center\">\r\n <ng-content select=\".main-content\"></ng-content>\r\n </div>\r\n <div class=\"col s12 my-library_subNoData center\">\r\n <ng-content select=\".sub-content\"></ng-content>\r\n </div>\r\n</div>", styles: ["@import\"https://fonts.googleapis.com/css2?family=Rubik&display=swap\";.my-library-button{padding:10px 20px;border:none;border-radius:5px;color:#fff;cursor:pointer;font-size:16px;transition:background-color .3s ease}.my-library-button:hover{opacity:.9}.my-library_noDataText{font-family:rubik!important;color:#4d4d4d;font-size:16px}.my-library_subNoData{font-family:roboto;font-size:13px;color:#a6a6a6}.my-library_emptyFlex{display:flex;justify-content:center;align-items:center;flex-direction:column;flex-wrap:wrap;gap:10px}\n"] }] }], ctorParameters: () => [], propDecorators: { backgroundColor: [{ type: Input }], onClick: [{ type: Output }] } }); /* * Public API Surface of my-component-lib */ /** * Generated bundle index. Do not edit. */ export { MyButton, MyComponentLib }; //# sourceMappingURL=neeyamoui-my-component-lib.mjs.map