movie-web/src/components/SearchBar.tsx

21 lines
627 B
TypeScript
Raw Normal View History

2022-02-07 23:22:35 +01:00
import { ButtonControl } from './Buttons/ButtonControl';
import { Icon, Icons } from './Icon';
import { TextInputControl, TextInputControlPropsNoLabel } from './TextInputs/TextInputControl';
export interface SearchBarProps extends TextInputControlPropsNoLabel {
buttonText?: string;
onClick?: () => void;
}
export function SearchBarInput(props: SearchBarProps) {
return (
<div>
<TextInputControl onChange={props.onChange} value={props.value} />
<ButtonControl onClick={props.onClick}>
<Icon icon={Icons.SEARCH} />
{ props.buttonText || "Search" }
</ButtonControl>
</div>
)
}