aboutsummaryrefslogtreecommitdiffstats
path: root/src/angular/searchbar/search-bar.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/angular/searchbar/search-bar.component.ts')
-rw-r--r--src/angular/searchbar/search-bar.component.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/angular/searchbar/search-bar.component.ts b/src/angular/searchbar/search-bar.component.ts
new file mode 100644
index 0000000..7f508d7
--- /dev/null
+++ b/src/angular/searchbar/search-bar.component.ts
@@ -0,0 +1,19 @@
+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;
+ @Output() public searchQueryClick: EventEmitter<string> = new EventEmitter<string>();
+
+ private searchButtonClick = (): void => {
+ this.searchQueryClick.emit(this.searchQuery);
+ }
+}