UNPKG

@nebular/eva-icons

Version:
65 lines (60 loc) 2.26 kB
import * as i0 from '@angular/core'; import { NgModule } from '@angular/core'; import * as i1 from '@nebular/theme'; import { NbSvgIcon } from '@nebular/theme'; import { icons } from 'eva-icons'; /* * @license * Copyright Akveo. All Rights Reserved. * Licensed under the MIT License. See License.txt in the project root for license information. */ class NbEvaSvgIcon extends NbSvgIcon { constructor(name, content) { super(name, ''); this.name = name; this.content = content; } getContent(options) { return this.content.toSvg({ width: '100%', height: '100%', fill: 'currentColor', ...options, }); } } class NbEvaIconsModule { constructor(iconLibrary) { this.NAME = 'eva'; iconLibrary.registerSvgPack(this.NAME, this.createIcons()); iconLibrary.setDefaultPack(this.NAME); } createIcons() { return Object .entries(icons) .map(([name, icon]) => { return [name, new NbEvaSvgIcon(name, icon)]; }) .reduce((newIcons, [name, icon]) => { newIcons[name] = icon; return newIcons; }, {}); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: NbEvaIconsModule, deps: [{ token: i1.NbIconLibraries }], target: i0.ɵɵFactoryTarget.NgModule }); } static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.0", ngImport: i0, type: NbEvaIconsModule }); } static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: NbEvaIconsModule }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: NbEvaIconsModule, decorators: [{ type: NgModule, args: [{}] }], ctorParameters: () => [{ type: i1.NbIconLibraries }] }); /* * @license * Copyright Akveo. All Rights Reserved. * Licensed under the MIT License. See License.txt in the project root for license information. */ /** * Generated bundle index. Do not edit. */ export { NbEvaIconsModule, NbEvaSvgIcon }; //# sourceMappingURL=nebular-eva-icons.mjs.map