Renamed prefixes in angular.json
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
<div *ngIf="item;let item" class="widget" [style.background-color]="itemTypeService.getColor(item.itemType)">
|
||||
<div class="align-middle icon" [ngClass]="itemTypeService.getIcon(item.itemType)"></div>
|
||||
<div class="title">{{item.name}}</div>
|
||||
</div>
|
@@ -0,0 +1,27 @@
|
||||
@import "../../_theme.scss";
|
||||
@import "~bootstrap/scss/bootstrap.scss";
|
||||
|
||||
.widget {
|
||||
padding:0.8rem;
|
||||
height:100%;
|
||||
width:100%;
|
||||
color:#ffffff;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.icon {
|
||||
display:block;
|
||||
font-size:6rem;
|
||||
text-align:center;
|
||||
}
|
||||
.title {
|
||||
display:block;
|
||||
position:absolute;
|
||||
width:calc(100% - 1.6rem );
|
||||
padding-top:0.5rem;
|
||||
bottom:0.8rem;
|
||||
height:2rem;
|
||||
overflow:hidden;
|
||||
white-space:nowrap;
|
||||
text-overflow:ellipsis;
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
import { Component, Input, Injectable} from '@angular/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import * as mapReducers from '../../reducers/map.reducer';
|
||||
import { commonReducers,ItemTypeService,IListItem } from '@farmmaps/common';
|
||||
|
||||
|
||||
|
||||
@Injectable()
|
||||
export abstract class AbstractItemListItemComponent {
|
||||
@Input() item: IListItem
|
||||
|
||||
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService) {
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export abstract class AbstractItemWidgetComponent {
|
||||
@Input() item: IListItem
|
||||
|
||||
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService) {
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@Component({
|
||||
selector: 'fm-map-item-list-item',
|
||||
templateUrl: './item-list-item.component.html',
|
||||
styleUrls: ['./item-list-item.component.scss']
|
||||
})
|
||||
export class ItemListItemComponent extends AbstractItemListItemComponent {
|
||||
|
||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService) {
|
||||
super(store, itemTypeService);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user