You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-desktop/ts/components/session/SessionSearchInput.tsx

33 lines
754 B
TypeScript

import React from 'react';
import { SessionIconButton, SessionIconSize, SessionIconType } from './icon';
interface Props {
searchString: string;
onChange: any;
placeholder: string;
}
export class SessionSearchInput extends React.Component<Props> {
public constructor(props: Props) {
super(props);
}
public render() {
const { searchString } = this.props;
return (
<div className="session-search-input">
<SessionIconButton
iconSize={SessionIconSize.Medium}
iconType={SessionIconType.Search}
/>
<input
value={searchString}
onChange={e => this.props.onChange(e.target.value)}
placeholder={this.props.placeholder}
/>
</div>
);
}
}