import autobind from 'autobind-decorator'; import * as React from 'react'; import { FormEvent } from 'react'; interface ISearchBoxProps { onChange?: (input: string) => void; filterInputRef?: (input: HTMLInputElement) => void; placeholder?: string; searchIconClassName?: string; boxHeight?: number; } export class SearchBox extends React.Component { public static defaultProps = { placeholder: '', searchIconClassName: 'fa fa-search form-control-feedback', boxHeight: 33.5, }; public render() { return (
); } @autobind private onChange(event: FormEvent) { if (this.props.onChange) { this.props.onChange(event.currentTarget.value); } } } export default SearchBox;