2020-02-14 06:14:09 +00:00
|
|
|
import {Component, Input, OnInit} from '@angular/core';
|
|
|
|
import {PopoverController} from '@ionic/angular';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'common-option-menu',
|
|
|
|
templateUrl: './option-menu.component.html',
|
|
|
|
styleUrls: ['./option-menu.component.scss'],
|
|
|
|
})
|
|
|
|
export class OptionMenuComponent implements OnInit {
|
2020-11-03 03:47:29 +00:00
|
|
|
@Input() menuItems: Array<{name: string, icon: string, value: string, type?: string, title?: string}> = [];
|
2020-02-14 06:14:09 +00:00
|
|
|
|
|
|
|
constructor(
|
|
|
|
protected popover: PopoverController,
|
|
|
|
) { }
|
|
|
|
|
|
|
|
ngOnInit() {}
|
|
|
|
|
|
|
|
async onSelect(value) {
|
|
|
|
await this.popover.dismiss(value);
|
|
|
|
}
|
|
|
|
}
|