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.
33 lines
754 B
TypeScript
33 lines
754 B
TypeScript
5 years ago
|
import React from 'react';
|
||
|
import { SessionIconButton, SessionIconSize, SessionIconType } from './icon';
|
||
|
|
||
|
interface Props {
|
||
|
searchString: string;
|
||
|
onChange: any;
|
||
5 years ago
|
placeholder: string;
|
||
5 years ago
|
}
|
||
|
|
||
5 years ago
|
export class SessionSearchInput extends React.Component<Props> {
|
||
5 years ago
|
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)}
|
||
5 years ago
|
placeholder={this.props.placeholder}
|
||
5 years ago
|
/>
|
||
|
</div>
|
||
|
);
|
||
|
}
|
||
|
}
|