UNPKG

ohayolibs

Version:

Ohayo is a set of essential modules for ohayojp.

27 lines (23 loc) 845 B
import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core'; import { LocaleData } from '@ohayo/theme'; import { NoticeIconSelect, NoticeItem } from './notice-icon.types'; @Component({ selector: 'notice-icon-tab', exportAs: 'noticeIconTab', templateUrl: './notice-icon-tab.component.html', preserveWhitespaces: false, encapsulation: ViewEncapsulation.None, }) export class NoticeIconTcomponentsomponent { @Input() locale: LocaleData = {}; @Input() data: NoticeItem; // tslint:disable-next-line:no-output-native @Output() readonly select = new EventEmitter<NoticeIconSelect>(); @Output() 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); } }