mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-15 10:25:07 +01:00
21 lines
627 B
TypeScript
21 lines
627 B
TypeScript
|
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>
|
||
|
)
|
||
|
}
|