SES-123 Icons module added

This commit is contained in:
Łukasz Góreczny 2020-12-27 16:25:00 +01:00
parent 9826e57e7f
commit b9c44c9120
5 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,20 @@
import {ChangeDetectionStrategy, Component, ElementRef, Input} from '@angular/core';
@Component({
selector: 'app-sc-icons',
template: `
<ng-content></ng-content>
`,
styles: [':host::ng-deep svg{width: 50px; height: 50px}'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class SessionCompanionIcons {
@Input()
set name(iconName: string) {
this.element.nativeElement.innerHTML = scIcons[iconName] || null;
}
constructor(private element: ElementRef) {
}
}

View File

@ -0,0 +1,10 @@
import {NgModule} from '@angular/core';
import {SessionCompanionIconsComponent} from './session-companion-icons.component';
@NgModule({
declarations: [SessionCompanionIconsComponent],
imports: [],
exports: []
})
export class SessionCompanionIconsModule {
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB