Add recently used section and scroll to category

Signed-off-by: Tulir Asokan <tulir@maunium.net>
This commit is contained in:
Tulir Asokan 2019-10-14 19:40:57 +03:00
parent 497b779334
commit 088c9bff9e
7 changed files with 115 additions and 34 deletions

View file

@ -28,8 +28,11 @@ class Search extends React.PureComponent {
render() {
return (
<div className="mx_EmojiPicker_search">
<input type="text" placeholder="Search" value={this.props.query} onChange={this.props.onChange}/>
{icons.search.search()}
<input type="text" placeholder="Search" value={this.props.query}
onChange={ev => this.props.onChange(ev.target.value)}/>
<button onClick={() => this.props.onChange("")}>
{this.props.query ? icons.search.delete() : icons.search.search()}
</button>
</div>
)
}