blob: 42dfaeb94e498e46590bf86a38f618a82e9c180a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import { Component, Input, Output, EventEmitter, HostBinding } from '@angular/core';
import { template } from "./search-bar.component.html";
@Component({
selector: 'sdc-search-bar',
template: template
})
export class SearchBarComponent {
@HostBinding('class') classes = 'sdc-search-bar';
@Input() public placeholder: string;
@Input() public label: string;
@Input() public searchQuery: string;
@Input() public debounceTime: number;
@Output() public searchQueryClick: EventEmitter<string> = new EventEmitter<string>();
// constructor() {
// this.debounceTime = 200;
// }
public searchButtonClick = (): void => {
this.searchQueryClick.emit(this.searchQuery);
}
}
|