import { Component, OnInit, ElementRef, Input } from '@angular/core'; import { CfCoreComponent } from '../core/core.component'; import { IconModel } from '../../models/icon/icon.model'; import { ButtonModel } from '../../models/button/button.model'; import { MenuItemModel } from '../../models/menu/menu-item.model'; import { InputModel } from '../../models/input/input.model'; /** * This component refers to a Stocks app. */ @Component({ selector: 'cf-stocks', template: " ", styles: [".wholeComponent { margin: 20px; } md-card { margin: 10px; background-color: #dcf1f5; width: 230px; } md-card-title { font-weight: bold; } md-card-subtitle { font-size: 15px; } md-card-content { font-size: 13px; } .row-right { display: inline-block; } "] }) export class CfStocksComponent implements OnInit { /*@Input() themeName:string ; @Input() settings: Array = []; iconIncrease: IconModel = { name: "trending_up", type: "mi", size: "50px" } iconDecrease: IconModel = { name: "trending_down", type: "mi", size: "50px" } iconOptions: IconModel = { name: "reorder", type: "mi", size: "20px" } menu: MenuItemModel[] = [ { label: 'Buy', type: 'standard', icon: { name: 'thumb_up', type: 'mi', size: '24px', color: { foreground: 'green', background: 'transparent' } }, notification: '', display: true, disable: false, onClick: this.clickFunc }, { label: '', type: 'divider', icon: { name: '', type: '', size: '', color: { foreground: '', background: '' } }, notification: '', display: true, disable: false, onClick: '' }, { label: 'Sell', type: 'standard', icon: { name: 'remove', type: 'mi', size: '24px', color: { foreground: 'red', background: 'transparent' } }, notification: '', display: true, disable: false, onClick: this.clickFunc } ]; menuIcon: IconModel = { name: 'monetization_on', type: 'mi', size: '36px' }*/ constructor(public elementRef: ElementRef) { } ngOnInit() { } clickFunc(menuItem: MenuItemModel): void { /*if(menuItem.label==="Buy") alert("Bought!"); else alert("Sold!");*/ } }