ohayolibs
Version:
Ohayo is a set of essential modules for ohayojp.
27 lines (23 loc) • 845 B
text/typescript
import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
import { LocaleData } from '@ohayo/theme';
import { NoticeIconSelect, NoticeItem } from './notice-icon.types';
export class NoticeIconTcomponentsomponent {
locale: LocaleData = {};
data: NoticeItem;
// tslint:disable-next-line:no-output-native
readonly select = new EventEmitter<NoticeIconSelect>();
readonly clear = new EventEmitter<string>();
onClick(item: NoticeItem): void {
this.select.emit({ title: this.data.title, item });
}
onClear(): void {
this.clear.emit(this.data.title);
}
}