Structural refactoring (#68)
* Moved html in scss to separate files * Moved components to designated folders * Moved logic from html to ts
This commit is contained in:
committed by
József Farkas
parent
036c2d0a70
commit
baaec669e0
@@ -0,0 +1,9 @@
|
||||
<div [ngSwitch]="name">
|
||||
<span *ngSwitchCase="'option-vertical'" class="glyphicon glyphicon-option-vertical" aria-hidden="true"></span>
|
||||
<i *ngSwitchCase="'square'" class="fa fa-square"></i>
|
||||
<i *ngSwitchCase="'mouse-pointer'" class="fa fa-mouse-pointer"></i>
|
||||
<i *ngSwitchCase="'clock'" class="fa fa-clock-o"></i>
|
||||
<i *ngSwitchCase="'trash'" class="glyphicon glyphicon-trash action--trash"></i>
|
||||
<i *ngSwitchCase="'pencil'" class="glyphicon glyphicon-pencil action--edit"></i>
|
||||
<i *ngSwitchCase="'question-circle'" class ="fa fa-question-circle"></i>
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
:host {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { NgSwitch, NgSwitchCase } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'icon',
|
||||
template: require('./icon.component.html'),
|
||||
styles: [require('./icon.component.scss')],
|
||||
directives: [NgSwitch, NgSwitchCase]
|
||||
})
|
||||
export class IconComponent implements OnInit {
|
||||
|
||||
@Input() name: string;
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() { }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user