Split inline SVGs to their own files

Signed-off-by: Tulir Asokan <tulir@maunium.net>
This commit is contained in:
Tulir Asokan 2019-10-20 12:13:32 +03:00
parent 30ffd65b6c
commit be829980f6
16 changed files with 241 additions and 193 deletions

View file

@ -17,8 +17,6 @@ limitations under the License.
import React from 'react';
import PropTypes from 'prop-types';
import * as icons from "./icons";
class Search extends React.PureComponent {
static propTypes = {
query: PropTypes.string.isRequired,
@ -39,11 +37,10 @@ class Search extends React.PureComponent {
return (
<div className="mx_EmojiPicker_search">
<input autoFocus type="text" placeholder="Search" value={this.props.query}
onChange={ev => this.props.onChange(ev.target.value)} ref={this.inputRef}/>
onChange={ev => this.props.onChange(ev.target.value)} ref={this.inputRef} />
<button onClick={() => this.props.onChange("")}
className={this.props.query ? "mx_EmojiPicker_search_clear" : ""}>
{this.props.query ? icons.search.delete() : icons.search.search()}
</button>
className={`mx_EmojiPicker_search_icon ${this.props.query ? "mx_EmojiPicker_search_clear" : ""}`}
title={this.props.query ? "Cancel search" : "Search"} />
</div>
);
}